forked from patractlabs/redspot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
35 lines (33 loc) · 914 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
28
29
30
31
32
33
34
35
// jest.config.js
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { compilerOptions } = require('./tsconfig.json');
const path = require('path');
module.exports = {
moduleFileExtensions: ['js', 'json', 'ts'],
testEnvironment: 'node',
verbose: true,
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.[jt]sx?$',
transform: {
'^.+\\.(t|j)s$': 'ts-jest'
},
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
prefix: path.resolve(__dirname)
}),
transformIgnorePatterns: [
'/node_modules/(?!@polkadot|@babel/runtime/helpers/esm/)'
],
testPathIgnorePatterns: [
'<rootDir>/examples/',
'<rootDir>/packages/redspot-template/',
'<rootDir>/build/',
'<rootDir>/packages/redspot-core/src/builtin-tasks/test.ts'
],
globals: {
'ts-jest': {
tsconfig: {
// allow js in typescript
allowJs: true
}
}
}
};