forked from firefox-devtools/debugger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest-test.config.js
40 lines (39 loc) · 1.22 KB
/
jest-test.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
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
const { resolve } = require("path");
const rootDir = resolve(__dirname);
module.exports = {
rootDir,
displayName: "test",
testURL: "http://localhost/",
testPathIgnorePatterns: [
"/node_modules/",
"/helpers/",
"/fixtures/",
"src/test/mochitest/examples/",
"<rootDir>/firefox",
"package.json",
"<rootDir>/packages"
],
modulePathIgnorePatterns: ["src/test/mochitest", "firefox"],
collectCoverageFrom: [
"src/**/*.js",
"!src/**/fixtures/*.js",
"!src/test/**/*.js",
"!src/components/stories/**/*.js",
"!**/*.mock.js",
"!**/*.spec.js"
],
transformIgnorePatterns: ["node_modules/(?!devtools-)"],
setupTestFrameworkScriptFile: "<rootDir>/src/test/tests-setup.js",
setupFiles: ["<rootDir>/src/test/shim.js", "jest-localstorage-mock"],
snapshotSerializers: [
"jest-serializer-babel-ast",
"enzyme-to-json/serializer"
],
moduleNameMapper: {
"\\.css$": "<rootDir>/src/test/__mocks__/styleMock.js",
"\\.svg$": "<rootDir>/src/test/__mocks__/svgMock.js"
}
};