Skip to content

Commit

Permalink
fix(tests): add test cases as a const
Browse files Browse the repository at this point in the history
  • Loading branch information
Atticus committed Apr 9, 2024
1 parent 765f39c commit 8458185
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions tests/integration/ar-io.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ import {

const contractTxId = ARNS_DEVNET_REGISTRY_TX;
const localCacheUrl = `https://api.arns.app`;
const testCases = [
[{ sortKey: evaluateToSortKey.toString() }],
[{ blockHeight: evaluateToBlockHeight }],
[undefined],
] as const;
describe('ArIO Client', () => {
const signer = new ArweaveSigner(JSON.parse(process.env.PRIMARY_WALLET_JWK!));
const ar = ArIO.init();
Expand Down Expand Up @@ -187,11 +192,7 @@ describe('ArIO Client', () => {
}
});

it.each([
[{ sortKey: evaluateToSortKey.toString() }],
[{ blockHeight: evaluateToBlockHeight }],
[undefined],
])(
it.each(testCases)(
`should return the prescribed observers for provided evaluation options: ${JSON.stringify('%s')}`,
async (evalTo) => {
const observers = await arIO.getPrescribedObservers({
Expand Down Expand Up @@ -254,11 +255,7 @@ describe('ArIO Client', () => {
expect(distributions).toBeDefined();
});

it.each([
[{ sortKey: evaluateToSortKey.toString() }],
[{ blockHeight: evaluateToBlockHeight }],
[undefined],
])(
it.each(testCases)(
`should return auction for provided evaluation options: ${JSON.stringify('%s')}`,
async (evalTo) => {
const auction = await arIO.getAuction({
Expand Down

0 comments on commit 8458185

Please sign in to comment.