From 24959b3f9b5b79394aaf3b4ef1aabeb5d4d07e0a Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Tue, 15 Oct 2024 16:51:27 -0500 Subject: [PATCH] chore(test): add e2e tests for validating contract handlers and APIs --- tests/e2e/esm/index.test.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/e2e/esm/index.test.js b/tests/e2e/esm/index.test.js index ab23682b..22a56585 100644 --- a/tests/e2e/esm/index.test.js +++ b/tests/e2e/esm/index.test.js @@ -334,6 +334,31 @@ describe('IO', async () => { } }); + it('should be able to get current epoch distributions', async () => { + const distributions = await io.getDistributions(); + assert.ok(distributions); + }); + + it('should be able to get epoch distributions at a specific epoch', async () => { + const distributions = await io.getDistributions({ epochIndex: 0 }); + assert.ok(distributions); + }); + + it('should be able to get current epoch observations', async () => { + const observations = await io.getObservations(); + assert.ok(observations); + }); + + it('should be able to get epoch observations at a specific epoch', async () => { + const observations = await io.getObservations({ epochIndex: 0 }); + assert.ok(observations); + }); + + it('should be able to get current demand factor', async () => { + const demandFactor = await io.getDemandFactor(); + assert.ok(demandFactor); + }); + it('should be able to create IOWriteable with valid signers', async () => { for (const signer of signers) { const io = IO.init({ signer });