2023-02-20 18:10:34 -06:00
|
|
|
const { pathsToModuleNameMapper } = require("ts-jest");
|
|
|
|
const { compilerOptions } = require("./tsconfig");
|
|
|
|
|
|
|
|
const aliases = pathsToModuleNameMapper(compilerOptions.paths, {
|
|
|
|
prefix: "<rootDir>"
|
|
|
|
})
|
|
|
|
|
2022-04-28 09:15:16 -06:00
|
|
|
module.exports = {
|
2022-05-24 08:09:48 -06:00
|
|
|
setupFilesAfterEnv: ['<rootDir>/setupTest.ts'],
|
2023-02-20 18:10:34 -06:00
|
|
|
testEnvironment: "jsdom",
|
|
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
|
2022-04-28 09:15:16 -06:00
|
|
|
moduleNameMapper: {
|
2023-02-20 18:10:34 -06:00
|
|
|
...aliases,
|
2022-05-24 08:09:48 -06:00
|
|
|
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/src/__mocks__/fileMock.ts",
|
2023-02-20 18:10:34 -06:00
|
|
|
"\\.(css|sass|scss|less)$": "identity-obj-proxy",
|
|
|
|
}
|
|
|
|
};
|