Skip to content

Commit

Permalink
fix(tests): add test for custom arIO client config
Browse files Browse the repository at this point in the history
  • Loading branch information
atticusofsparta committed Feb 15, 2024
1 parent 94810ed commit 0e6142b
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions tests/ArIO.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,18 @@ jest
.mockResolvedValue(ArnsStateResponse);

describe('ArIO Client', () => {
const remoteCacheProvider = new ArNSRemoteCache({});
const arioClient = new ArIO({
contractStateProvider: remoteCacheProvider,
});
const arIO = new ArIO({});

it('should create an ArIO client', () => {
expect(arioClient).toBeInstanceOf(ArIO);
const localClient = new ArIO({});
expect(localClient).toBeInstanceOf(ArIO);
it('should create a custom ArIO client', () => {
const remoteCacheProvider = new ArNSRemoteCache({});
const customArioClient = new ArIO({
contractStateProvider: remoteCacheProvider,
});
expect(customArioClient).toBeInstanceOf(ArIO);
});

it('should get a contract state', async () => {
const state = await arioClient.getContractState<Record<string, any>>({
const state = await arIO.getContractState<Record<string, any>>({
contractTxId: ARNS_REGISTRY_TX,
});
expect(state).toBeDefined();
Expand Down

0 comments on commit 0e6142b

Please sign in to comment.