forked from DimensionDev/Maskbook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.ts
29 lines (27 loc) · 930 Bytes
/
jest.config.ts
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
import type { Config } from '@jest/types'
import { resolve } from 'path'
const options: Config.InitialOptions = {
testRegex: ['/__tests__/.*\\.[jt]sx?$'],
preset: 'ts-jest',
testEnvironment: 'jest-environment-jsdom-fourteen',
globals: {
'ts-jest': { isolatedModules: true },
},
globalTeardown: resolve(__dirname, 'scripts', 'jest-global-teardown'),
setupFiles: [
require.resolve('jest-webextension-mock'),
require.resolve('fake-indexeddb/auto'),
resolve(__dirname, 'scripts', 'jest-setup.js'),
],
transformIgnorePatterns: [
// skip packages other than 'holoflows/kit'
],
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'),
},
}
export default options