Skip to content

Commit

Permalink
test: reorder tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boray committed Jan 10, 2025
1 parent 1f52216 commit 4c6cbe2
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions tests/resolvers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,25 +250,6 @@ describe('Query Resolvers', async () => {
process.exit(0);
});

describe("Block", async () => {
let blockResponse: MaxBlockHeightInfo;
let results: BlockQueryResult;

test("Fetching the max block height should not throw", async () => {
assert.doesNotThrow(async () => {
await executeBlockQuery();
});
});

test("Fetching the max block height should return the max block height", async () => {
results = await executeBlockQuery();
blockResponse = results.data.block;
assert.ok(blockResponse.canonicalMaxBlockHeight > 0);
assert.ok(blockResponse.pendingMaxBlockHeight > 0);
});

});

describe('Events', async () => {
let eventsResponse: EventOutput[];
let lastBlockEvents: Maybe<EventData>[];
Expand Down Expand Up @@ -562,6 +543,24 @@ describe('Query Resolvers', async () => {
});
});

describe("Block", async () => {
let blockResponse: MaxBlockHeightInfo;
let results: BlockQueryResult;

test("Fetching the max block height should not throw", async () => {
assert.doesNotThrow(async () => {
await executeBlockQuery();
});
});

test("Fetching the max block height should return the max block height", async () => {
results = await executeBlockQuery();
blockResponse = results.data.block;
assert.ok(blockResponse.canonicalMaxBlockHeight > 0);
assert.ok(blockResponse.pendingMaxBlockHeight > 0);
});

});

});

Expand Down

0 comments on commit 4c6cbe2

Please sign in to comment.