Skip to content

Commit

Permalink
fix(tests): test 404 response
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Feb 15, 2024
1 parent 30d3e8c commit 590dea6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/arns-remote-cache.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,19 @@ describe('ArIO Client', () => {

expect(result).toBeInstanceOf(Error);
});

it('should throw 404 on non existent contract', async () => {
let result;
try {
const contractTxId = ''.padEnd(43, 'a');
result = await arioClient
.getContractState({ contractTxId })
.catch((e) => e);
} catch (error) {
result = error;
}

expect(result).toBeInstanceOf(Error);
expect(result.message).toMatch(/404/);
});
});

0 comments on commit 590dea6

Please sign in to comment.