2021-04-30 12:26:06 +00:00
|
|
|
// See: https://github.com/snowpackjs/snowpack/issues/3242
|
|
|
|
// @ts-ignore
|
|
|
|
import snowpackConfig from "@snowpack/app-scripts-react/jest.config.js";
|
2021-05-04 17:58:18 +00:00
|
|
|
import type { Config } from "@jest/types";
|
2021-04-30 12:26:06 +00:00
|
|
|
|
|
|
|
const config: Config.InitialOptions = {
|
|
|
|
...snowpackConfig(),
|
|
|
|
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
|
|
|
|
moduleNameMapper: {
|
2021-09-16 10:24:21 +00:00
|
|
|
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
|
|
|
"<rootDir>/mocks/fileMock.js",
|
|
|
|
"\\.(css|less)$": "<rootDir>/mocks/styleMock.js",
|
|
|
|
},
|
2021-04-30 12:26:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|