forked from shopstr-eng/shopstr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.cjs
More file actions
25 lines (21 loc) · 724 Bytes
/
jest.config.cjs
File metadata and controls
25 lines (21 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const nextJest = require("next/jest");
const createJestConfig = nextJest({
// Provide the path to our Next.js app to load next.config.js and .env files in our test environment
dir: "./",
});
const customJestConfig = {
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
testEnvironment: "jest-environment-jsdom",
moduleNameMapper: {
// Handle module aliases
"^@/(.*)$": "<rootDir>/$1",
},
};
module.exports = async () => {
const jestConfig = await createJestConfig(customJestConfig)();
jestConfig.transformIgnorePatterns = [
"/node_modules/(?!(dexie|nostr-tools|@noble|@scure|@getalby/lightning-tools|@cashu/cashu-ts|uuid)/)",
"^.+\\.module\\.(css|sass|scss)$",
];
return jestConfig;
};