-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
45 lines (44 loc) · 1.1 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
const { TextDecoder, TextEncoder } = require('node:util');
module.exports = {
globals: {
TextDecoder,
TextEncoder,
},
rootDir: './',
collectCoverageFrom: ['src/**/*.{js,jsx,ts,tsx}'],
testEnvironment: 'jest-environment-jsdom',
transform: {
'^.+\\.(ts|tsx|js|jsx|mjs)$': [
'esbuild-jest',
{
sourcemap: true,
loaders: {
'.test.ts': 'tsx',
},
},
],
'^.+\\.rn$': 'jest-text-transformer',
},
transformIgnorePatterns: ['/!node_modules\\/lodash-es/'],
moduleDirectories: ['node_modules', 'src', 'rune_build'],
modulePaths: [
'<rootDir>',
'<rootDir>/rune_build',
'<rootDir>/node_modules',
'<rootDir>/src',
],
moduleFileExtensions: ['js', 'jsx', 'mjs', 'ts', 'tsx'],
moduleNameMapper: {
'^src(.*)$': '<rootDir>/src/$1',
'^rune$': '<rootDir>/rune_build',
'#(.*)': '<rootDir>/node_modules/$1',
'^uint8arrays/(.*)$': '<rootDir>/node_modules/uint8arrays/dist/src/$1',
},
preset: 'ts-jest',
resolver: 'ts-jest-resolver',
// globals: {
// 'ts-jest': {
// diagnostics: false,
// },
// },
};