mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-28 16:07:49 +01:00
implements #4
This commit is contained in:
@@ -3,8 +3,13 @@ const { compilerOptions } = require("./tsconfig");
|
||||
|
||||
module.exports = {
|
||||
preset: "ts-jest",
|
||||
moduleNameMapper: pathsToModuleNameMapper(compilerOptions.paths, {
|
||||
prefix: "<rootDir>/",
|
||||
}),
|
||||
moduleNameMapper: {
|
||||
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
|
||||
"<rootDir>/src/fileMock.ts",
|
||||
"\\.(css|less|scss)$": "<rootDir>/src/styleMock.ts",
|
||||
...pathsToModuleNameMapper(compilerOptions.paths, {
|
||||
prefix: "<rootDir>/",
|
||||
}),
|
||||
},
|
||||
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user