/* 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/. */ export default { testEnvironment: "jsdom", moduleDirectories: ["node_modules", ""], transform: { "^.+\\.m?jsx?$": [ "babel-jest", { presets: [ ["@babel/preset-env", { targets: { node: "current" } }], ["@babel/preset-react", { runtime: "automatic" }], ], }, ], }, moduleNameMapper: { "^resource://newtab/(.*)$": "/$1", "^resource:///modules/asrouter/(.*)$": "/../../components/asrouter/modules/$1", "^resource:///modules/topsites/(.*)$": "/../../components/topsites/$1", "^resource:///modules/(.*)$": "/../../modules/$1", "^moz-src:///(.*)$": "/../../../$1", }, setupFilesAfterEnv: ["/test/jest/jest-setup.mjs"], testMatch: [ "/test/jest/**/*.test.js", "/test/jest/**/*.test.jsx", ], };