Skip to content

Commit

Permalink
chore(test): add e2e tests for validating contract handlers and APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Oct 15, 2024
1 parent 5481b2e commit 24959b3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tests/e2e/esm/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 24959b3

Please sign in to comment.