forked from botpress/botpress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (33 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
const path = require('path')
// Required in order for the Jest VS Code Extension to work properly
process.env.NATIVE_EXTENSIONS_DIR = './build/native-extensions'
module.exports = {
preset: 'ts-jest',
globals: {
'ts-jest': {
tsConfig: '<rootDir>/src/tsconfig.test.json',
diagnostics: false
}
},
setupFiles: ['<rootDir>/src/bp/jest-before.ts'],
globalSetup: '<rootDir>/src/bp/jest-rewire.ts',
setupFilesAfterEnv: [],
collectCoverage: false,
resetModules: true,
verbose: true,
modulePaths: ['<rootDir>/src/bp/', '<rootDir>/src/bp/ui-studio'],
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'd.ts'],
modulePathIgnorePatterns: ['out'],
transform: {
'^.+\\.(ts|tsx|js)$': 'ts-jest'
},
resolver: '<rootDir>/src/bp/jest-resolver.js',
moduleNameMapper: {
'^botpress/sdk$': '<rootDir>/src/bp/core/app/sdk_impl'
},
testMatch: ['**/(src|test)/**/*.test.(ts|js)'],
testPathIgnorePatterns: ['out', 'build', 'node_modules', 'e2e', '.*\\.u\\.test\\.(?:ts|js)'],
testEnvironment: 'node',
rootDir: '.',
testResultsProcessor: './node_modules/jest-html-reporter'
}