-
Notifications
You must be signed in to change notification settings - Fork 32
/
jest.config.js
29 lines (29 loc) · 1.09 KB
/
jest.config.js
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
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
collectCoverageFrom: ['**/*.{js,jsx,ts,tsx}', '!**/node_modules/**'],
testPathIgnorePatterns: ['/node_modules/', '/.next/'],
transform: {
'^.+\\.(js|jsx|ts|tsx)$': '<rootDir>/node_modules/babel-jest'
},
transformIgnorePatterns: [
'/node_modules/',
'^.+\\.module\\.(css|sass|scss)$'
],
moduleNameMapper: {
'^.+\\.module\\.(css|sass|scss)$': 'identity-obj-proxy',
'multiformats/basics':
'<rootDir>/node_modules/multiformats/cjs/src/basics.js',
'multiformats/cid': '<rootDir>/node_modules/multiformats/cjs/src/cid.js',
multiformats: '<rootDir>/node_modules/multiformats/cjs/src/index.js',
'@ipld/dag-cbor': '<rootDir>/node_modules/@ipld/dag-cbor/cjs/index.js',
cborg: '<rootDir>/node_modules/cborg/cjs/cborg.js',
uint8arrays: '<rootDir>/node_modules/uint8arrays/cjs/src/index.js'
},
setupFilesAfterEnv: ['./jest.setup.js'],
testEnvironment: 'jsdom',
modulePathIgnorePatterns: ['<rootDir>/.*/__mocks__'],
clearMocks: true,
fakeTimers: {
enableGlobally: true
}
}