Skip to content

Commit 4697a10

Browse files
committed
fix specs
1 parent 4a25f21 commit 4697a10

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

e2e/zombienet/src/hooks/useContract2.test.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,9 @@ describe('useContract2', () => {
7575
const { result } = renderHook(() => usePSP22Balance({ contractAddress, address: 'invalid_address' }), { wrapper });
7676

7777
// The balance should remain undefined
78-
await waitFor(
79-
() => {
80-
expect(result.current.data).toBeUndefined();
81-
},
82-
{ timeout: 5000 },
83-
);
78+
await waitFor(() => {
79+
expect(result.current.data).toBeUndefined();
80+
});
8481
});
8582

8683
it('should automatic update balance when watch is enabled', async () => {
@@ -91,15 +88,15 @@ describe('useContract2', () => {
9188
expect(result.current.data).toBeDefined();
9289
});
9390

94-
const aliceBalance = result.current.data;
91+
const aliceBalance = result.current.data!;
9592

9693
// Simulate a transfer event
9794
const { alice } = devPairs();
9895
await mintPSP22Balance(contractAddress, alice, BigInt(1e12));
9996

10097
// Wait for the balance to be updated
10198
await waitFor(() => {
102-
expect(result.current.data).toBe(BigInt(1e20) + BigInt(1e12));
99+
expect(result.current.data).toBe(aliceBalance + BigInt(1e12));
103100
expect(result.current.data).not.toEqual(aliceBalance);
104101
});
105102
});

e2e/zombienet/src/setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ beforeAll(async () => {
1616
}
1717
});
1818
});
19-
}, 120_000);
19+
}, 300_000);
2020

2121
afterAll(async () => {
2222
await global.client.disconnect();

e2e/zombienet/vitest.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default defineConfig({
66
test: {
77
environment: 'happy-dom',
88
setupFiles: './src/setup.ts',
9-
testTimeout: 120_000,
10-
hookTimeout: 120_000,
9+
testTimeout: 300_000,
10+
hookTimeout: 300_000,
1111
},
1212
});

0 commit comments

Comments
 (0)