Skip to content

Commit

Permalink
(launch, registry) chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanya-atatakai committed Oct 23, 2024
1 parent 25ddd7f commit bec478b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions apps/autonolas-registry/jest.setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,16 @@ jest.mock('./common-util/Login/config', () => ({
EVM_SUPPORTED_CHAINS: [{ id: 1 }],
SVM_SUPPORTED_CHAINS: [{ id: 1 }],
}));

const { mainnet, optimism, gnosis, polygon, base, arbitrum, celo, mode } = require('viem/chains');

jest.mock('wagmi/chains', () => ({
mainnet,
optimism,
gnosis,
polygon,
base,
arbitrum,
celo,
mode,
}));
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ describe('listServices/index.jsx - EVM', () => {

await waitFor(async () => {
expect(within(allServicesTable).getByText('5001')).toBeInTheDocument();
expect(within(allServicesTable).getByText(/0x8626...9C1199/)).toBeInTheDocument();
expect(within(allServicesTable).getByText(/0x8626f...C1199 ↗/)).toBeInTheDocument();
expect(within(allServicesTable).getByText(/Terminated Bonded/)).toBeInTheDocument();
expect(within(allServicesTable).getByText(/View/)).toBeInTheDocument();
});
Expand Down Expand Up @@ -299,7 +299,7 @@ describe('listServices/index.jsx - SVM', () => {
expect(getByText('Action')).toBeInTheDocument();

// rows
expect(getByText(/DrGvsA...D3Wm5x/)).toBeInTheDocument();
expect(getByText(/DrGvsAx...3Wm5x/)).toBeInTheDocument();
expect(getByText(/Terminated Bonded/)).toBeInTheDocument();
expect(getByText(/View/)).toBeInTheDocument();
});
Expand Down
2 changes: 1 addition & 1 deletion apps/launch/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
displayName: 'launch',
preset: '../../jest.preset.js',
testEnvironment: 'jsdom',
testTimeout: 10000,
testTimeout: 15000,
moduleNameMapper: {
...pathsToModuleNameMapper(compilerOptions.paths, { prefix: resolve(__dirname, '../..') }),
'^util/(.*)$': '<rootDir>/util/$1',
Expand Down

0 comments on commit bec478b

Please sign in to comment.