2017-07-16 14:49:37 +03:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const ENABLE_COVERAGE = !!process.env.CI;
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
setupFiles: ["<rootDir>/tests_config/run_spec.js"],
|
|
|
|
snapshotSerializers: ["<rootDir>/tests_config/raw-serializer.js"],
|
|
|
|
testRegex: "jsfmt\\.spec\\.js$|__tests__/.*\\.js$",
|
|
|
|
testPathIgnorePatterns: ["tests/new_react", "tests/more_react"],
|
|
|
|
collectCoverage: ENABLE_COVERAGE,
|
2017-07-17 14:32:33 +03:00
|
|
|
collectCoverageFrom: ["src/**/*.js", "index.js", "!<rootDir>/node_modules/"],
|
2017-07-16 14:49:37 +03:00
|
|
|
coveragePathIgnorePatterns: [
|
2018-05-24 21:30:45 +03:00
|
|
|
"<rootDir>/standalone.js",
|
2018-04-25 19:29:35 +03:00
|
|
|
"<rootDir>/src/doc/doc-debug.js",
|
|
|
|
"<rootDir>/src/main/massage-ast.js"
|
2017-10-02 18:58:55 +03:00
|
|
|
],
|
2018-01-05 13:09:51 +03:00
|
|
|
moduleNameMapper: {
|
|
|
|
// Jest wires `fs` to `graceful-fs`, which causes a memory leak when
|
|
|
|
// `graceful-fs` does `require('fs')`.
|
|
|
|
// Ref: https://github.com/facebook/jest/issues/2179#issuecomment-355231418
|
2018-05-24 21:30:45 +03:00
|
|
|
// If this is removed, see also scripts/build/build.js.
|
2018-01-05 13:09:51 +03:00
|
|
|
"graceful-fs": "<rootDir>/tests_config/fs.js"
|
|
|
|
},
|
2017-10-02 18:58:55 +03:00
|
|
|
transform: {}
|
2017-07-16 14:49:37 +03:00
|
|
|
};
|