Bug 1861305 - Renew data collection for audio_process_per_codec_name r=padenot
[gecko.git] / devtools / client / debugger / jest-test.config.js
blob67718cc3f1d382541a83063d088f4a80b8e2da01
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2  * License, v. 2.0. If a copy of the MPL was not distributed with this
3  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
5 "use strict";
7 /* global __dirname */
9 const sharedJestConfig = require(`${__dirname}/../shared/test-helpers/shared-jest.config`);
11 const { resolve } = require("path");
12 const rootDir = resolve(__dirname);
13 module.exports = {
14   rootDir,
15   displayName: "test",
16   testURL: "http://localhost/",
17   testEnvironment: "jsdom",
18   testPathIgnorePatterns: [
19     "/node_modules/",
20     "/helpers/",
21     "/fixtures/",
22     "src/test/mochitest/examples/",
23     "<rootDir>/firefox",
24     "package.json",
25   ],
26   modulePathIgnorePatterns: ["test/mochitest"],
27   collectCoverageFrom: [
28     "src/**/*.js",
29     "!src/**/fixtures/*.js",
30     "!src/test/**/*.js",
31     "!src/components/stories/**/*.js",
32     "!**/*.mock.js",
33     "!**/*.spec.js",
34   ],
35   transform: {
36     "\\.[jt]sx?$": "babel-jest",
37   },
38   transformIgnorePatterns: ["node_modules/(?!(devtools-|react-aria-))"],
39   setupFilesAfterEnv: ["<rootDir>/src/test/tests-setup.js"],
40   setupFiles: ["<rootDir>/src/test/shim.js", "jest-localstorage-mock"],
41   snapshotSerializers: [
42     "jest-serializer-babel-ast",
43     "enzyme-to-json/serializer",
44   ],
45   moduleNameMapper: {
46     ...sharedJestConfig.moduleNameMapper,
47     "\\.css$": "<rootDir>/../shared/test-helpers/jest-fixtures/empty-module",
48     "\\.svg$": "<rootDir>/../shared/test-helpers/jest-fixtures/svgMock.js",
49     "react-dom-factories": "<rootDir>/../shared/vendor/react-dom-factories.js",
50   },