PromucFlow_constructor/app/client/packages/design-system/ads/jest.config.js

17 lines
740 B
JavaScript
Raw Normal View History

2024-07-29 13:23:26 +00:00
module.exports = {
roots: ["<rootDir>", "<rootDir>/src"], // Set this to the directory containing your source code
modulePaths: ["<rootDir>"],
moduleDirectories: ["node_modules", "src"],
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"], // Optional: Additional setup
testEnvironment: "jsdom",
transform: {
"^.+\\.(ts|tsx)$": "ts-jest", // Use ts-jest for transforming TypeScript files
"\\.(svg)$": "<rootDir>/fileTransformer.js", // Create this file for SVG handling (see below)
},
moduleNameMapper: {
// this mocks all binary files so jest doesn't try to convert it into js
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/fileTransformer.js",
},
};