forked from oasisprotocol/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
29 lines (27 loc) · 884 Bytes
/
jest.config.js
File metadata and controls
29 lines (27 loc) · 884 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// @ts-check
// https://jestjs.io/docs/configuration#defaults
/** @type {import('ts-jest').JestConfigWithTsJest} */
const config = {
rootDir: './',
modulePaths: ['<rootDir>/src'],
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json'],
moduleNameMapper: {
'.*\\.(css|scss|sass)$': '<rootDir>internals/jest/mocks/cssModule.js',
'.*\\.(jpg|jpeg|png|gif|webp|svg)$': '<rootDir>internals/jest/mocks/image.js',
},
clearMocks: true,
resetMocks: true,
setupFiles: ['react-app-polyfill/jsdom'],
setupFilesAfterEnv: ['<rootDir>/internals/jest/setupTests.ts'],
testEnvironment: 'jsdom',
transform: {
'^.+\\.(js|jsx|mjs|cjs|ts|tsx)$': ['ts-jest', {
// Disable typechecking to speedup tests. We have `yarn checkTs`.
isolatedModules: true,
}],
},
transformIgnorePatterns: [
'/node_modules/(?!(cborg)/)',
],
}
module.exports = config