forked from WebThingsIO/gateway
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
33 lines (31 loc) · 696 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
const semver = require('semver');
const testPathIgnorePatterns = [
'/node_modules/',
];
if (semver.major(process.versions.node) <= 9) {
// fluent uses node 10 features
testPathIgnorePatterns.push('<rootDir>/src/test/schema-form');
testPathIgnorePatterns.push('<rootDir>/src/test/browser');
}
module.exports = {
coverageDirectory: './coverage/',
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
],
testMatch: [
'**/test/**/*-test.(ts|tsx|js)',
],
testPathIgnorePatterns,
transform: {
'\\.tsx?$': 'ts-jest',
'\\.js?$': 'babel-jest',
},
setupFilesAfterEnv: [
'<rootDir>/src/test/common.js',
],
testEnvironment: 'node',
};