forked from prettier/plugin-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjest.config.js
44 lines (42 loc) · 1.18 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
"use strict";
const ENABLE_COVERAGE = !!process.env.CI;
module.exports = {
collectCoverage: ENABLE_COVERAGE,
collectCoverageFrom: [
"<rootDir>/src/**/*.js",
"!<rootDir>/node_modules/",
"!<rootDir>/tests_config/"
],
projects: [
{
displayName: "test-node",
setupFiles: ["<rootDir>/tests_config/run_spec.js"],
testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$",
snapshotSerializers: ["jest-snapshot-serializer-raw"],
testEnvironment: "node",
globals: {
STANDALONE: false
}
},
...(process.env.SKIP_STANDALONE_TESTS === "true"
? []
: [
{
displayName: "test-standalone",
setupFiles: ["<rootDir>/tests_config/run_spec.js"],
testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$",
snapshotSerializers: ["jest-snapshot-serializer-raw"],
testEnvironment: "jsdom",
globals: {
STANDALONE: true
}
}
]),
{
runner: "jest-runner-eslint",
displayName: "lint",
testMatch: ["<rootDir>/**/*.js"],
testPathIgnorePatterns: ["<rootDir>/node_modules/", "<rootDir>/coverage/"]
}
]
};