remove code for old Node from jest config

This commit is contained in:
Georgii Dolzhykov committed 2020-01-10 00:45:51 +02:00
1 parent 3a96c6d542
commit d83277bdf2
1 file changed
+1 -11
+1 -11
View File
@@ -3,14 +3,6 @@
const ENABLE_TEST_RESULTS = !!process.env.ENABLE_TEST_RESULTS;
const ENABLE_CODE_COVERAGE = !!process.env.ENABLE_CODE_COVERAGE;
const requiresPrettierInternals = [
"tests_integration/__tests__/util-shared.js",
"tests_integration/__tests__/help-options.js"
];
const semver = require("semver");
const isOldNode = semver.parse(process.version).major <= 4;
module.exports = {
setupFiles: ["<rootDir>/tests_config/run_spec.js"],
snapshotSerializers: [
@@ -18,9 +10,7 @@ module.exports = {
"jest-snapshot-serializer-ansi"
],
testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$",
testPathIgnorePatterns: ["tests/new_react", "tests/more_react"].concat(
isOldNode ? requiresPrettierInternals : []
),
testPathIgnorePatterns: ["tests/new_react", "tests/more_react"],
collectCoverage: ENABLE_CODE_COVERAGE,
collectCoverageFrom: ["src/**/*.js", "index.js", "!<rootDir>/node_modules/"],
coveragePathIgnorePatterns: [