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/>. */
9 const sharedJestConfig = require(`${__dirname}/../shared/test-helpers/shared-jest.config`);
11 const { resolve } = require("path");
12 const rootDir = resolve(__dirname);
16 testURL: "http://localhost/",
17 testEnvironment: "jsdom",
18 testPathIgnorePatterns: [
22 "src/test/mochitest/examples/",
26 modulePathIgnorePatterns: ["test/mochitest"],
27 collectCoverageFrom: [
29 "!src/**/fixtures/*.js",
31 "!src/components/stories/**/*.js",
36 "\\.[jt]sx?$": "babel-jest",
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",
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",