Skip to content

Commit bec478b

Browse files
(launch, registry) chore: fix tests
1 parent 25ddd7f commit bec478b

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

apps/autonolas-registry/jest.setup.js

+13
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,16 @@ jest.mock('./common-util/Login/config', () => ({
4545
EVM_SUPPORTED_CHAINS: [{ id: 1 }],
4646
SVM_SUPPORTED_CHAINS: [{ id: 1 }],
4747
}));
48+
49+
const { mainnet, optimism, gnosis, polygon, base, arbitrum, celo, mode } = require('viem/chains');
50+
51+
jest.mock('wagmi/chains', () => ({
52+
mainnet,
53+
optimism,
54+
gnosis,
55+
polygon,
56+
base,
57+
arbitrum,
58+
celo,
59+
mode,
60+
}));

apps/autonolas-registry/tests/components/ListServices/index.test.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ describe('listServices/index.jsx - EVM', () => {
227227

228228
await waitFor(async () => {
229229
expect(within(allServicesTable).getByText('5001')).toBeInTheDocument();
230-
expect(within(allServicesTable).getByText(/0x8626...9C1199/)).toBeInTheDocument();
230+
expect(within(allServicesTable).getByText(/0x8626f...C1199 /)).toBeInTheDocument();
231231
expect(within(allServicesTable).getByText(/Terminated Bonded/)).toBeInTheDocument();
232232
expect(within(allServicesTable).getByText(/View/)).toBeInTheDocument();
233233
});
@@ -299,7 +299,7 @@ describe('listServices/index.jsx - SVM', () => {
299299
expect(getByText('Action')).toBeInTheDocument();
300300

301301
// rows
302-
expect(getByText(/DrGvsA...D3Wm5x/)).toBeInTheDocument();
302+
expect(getByText(/DrGvsAx...3Wm5x/)).toBeInTheDocument();
303303
expect(getByText(/Terminated Bonded/)).toBeInTheDocument();
304304
expect(getByText(/View/)).toBeInTheDocument();
305305
});

apps/launch/jest.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module.exports = {
66
displayName: 'launch',
77
preset: '../../jest.preset.js',
88
testEnvironment: 'jsdom',
9-
testTimeout: 10000,
9+
testTimeout: 15000,
1010
moduleNameMapper: {
1111
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: resolve(__dirname, '../..') }),
1212
'^util/(.*)$': '<rootDir>/util/$1',

0 commit comments

Comments
 (0)