forked from prettier-solidity/prettier-plugin-solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
40 lines (39 loc) · 1.05 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
const FULL_TEST = Boolean(process.env.FULL_TEST);
const TEST_STANDALONE = Boolean(process.env.TEST_STANDALONE);
module.exports = {
collectCoverage: FULL_TEST,
collectCoverageFrom: [
'scripts/**/*.js',
'!scripts/generateIndexes.js',
'src/**/*.js',
'!<rootDir>/node_modules/',
'!src/prettier-comments/**/*.js'
],
coverageDirectory: './coverage/',
coveragePathIgnorePatterns: ['/node_modules/', '/scripts/'],
coverageThreshold: {
global: {
branches: 100,
functions: 100,
lines: 100,
statements: 100
}
},
moduleNameMapper: {
'^prettier$': TEST_STANDALONE
? '<rootDir>/node_modules/prettier/standalone'
: '<rootDir>/node_modules/prettier'
},
setupFiles: ['<rootDir>/tests/config/setup.js'],
snapshotSerializers: [
'jest-snapshot-serializer-raw',
'jest-snapshot-serializer-ansi'
],
testEnvironment: 'node',
testRegex: 'jsfmt\\.spec\\.js$|tests/unit/.*\\.js$',
transform: {},
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname'
]
};