forked from DimensionDev/Maskbook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.js
27 lines (26 loc) · 854 Bytes
/
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
const path = require('path')
module.exports = {
testRegex: ['/__tests__/.*\\.[jt]sx?$'],
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom-fourteen',
globals: {
'ts-jest': {
isolatedModules: true,
},
},
globalTeardown: path.join(__dirname, './scripts/jest-global-teardown'),
setupFiles: [
require.resolve('jest-webextension-mock'),
require.resolve('fake-indexeddb/auto'),
path.join(__dirname, './scripts/jest-setup.js'),
],
// skip packages other than 'holoflows/kit'
transformIgnorePatterns: [],
transform: {
'node_modules.+(holoflows).+.js$': 'jest-esm-transformer',
},
moduleNameMapper: {
'lodash-es': require.resolve('lodash'),
'idb/with-async-ittr-cjs': require.resolve('idb/with-async-ittr-cjs.js'),
},
}