2021-06-20 00:12:59 +00:00
|
|
|
module.exports = async () => {
|
2023-03-12 16:50:15 +00:00
|
|
|
process.env.TZ = "UTC";
|
2021-06-20 00:12:59 +00:00
|
|
|
|
|
|
|
return {
|
2023-03-12 16:50:15 +00:00
|
|
|
testEnvironment: "jsdom",
|
|
|
|
testRegex: "__tests__/.*Spec.(js|ts)x?$",
|
|
|
|
roots: ["<rootDir>/src/js"],
|
|
|
|
unmockedModulePathPatterns: ["react"],
|
|
|
|
coverageDirectory: "./coverage",
|
|
|
|
coveragePathIgnorePatterns: [
|
2021-08-20 16:38:22 +00:00
|
|
|
"<rootDir>/src/js/contrib/",
|
|
|
|
"<rootDir>/src/js/filt/",
|
2023-03-12 16:50:15 +00:00
|
|
|
"<rootDir>/src/js/components/editors/",
|
2021-06-20 00:12:59 +00:00
|
|
|
],
|
2023-03-12 16:50:15 +00:00
|
|
|
collectCoverageFrom: ["src/js/**/*.{js,jsx,ts,tsx}"],
|
|
|
|
transform: {
|
2021-06-20 00:12:59 +00:00
|
|
|
"^.+\\.[jt]sx?$": [
|
|
|
|
"esbuild-jest",
|
|
|
|
{
|
2023-03-12 16:50:15 +00:00
|
|
|
loaders: {
|
|
|
|
".js": "tsx",
|
2021-06-20 00:12:59 +00:00
|
|
|
},
|
2023-03-12 16:50:15 +00:00
|
|
|
format: "cjs",
|
|
|
|
sourcemap: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|