forked from team-mirai-volunteer/action-board
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
37 lines (34 loc) · 1.06 KB
/
Copy pathjest.config.js
File metadata and controls
37 lines (34 loc) · 1.06 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
const nextJest = require("next/jest");
const createJestConfig = nextJest({
// Provide the path to your Next.js app to load next.config.js and .env files
dir: "./",
});
// Add any custom config to be passed to Jest
/** @type {import('jest').Config} */
const config = {
testEnvironment: "jsdom",
testMatch: ["**/*.test.{ts,tsx}"],
moduleNameMapper: {
"^@/(.*)$": "<rootDir>/$1",
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
collectCoverage: true,
collectCoverageFrom: [
"{app,components,lib}/**/*.{ts,tsx}",
"!**/*.d.ts",
"!**/*.stories.{ts,tsx}",
],
coverageReporters: ["html", "text", "lcov"],
coverageDirectory: "<rootDir>/coverage",
coveragePathIgnorePatterns: [
"<rootDir>/app/privacy/",
"<rootDir>/app/terms/",
"<rootDir>/lib/types/",
"<rootDir>/lib/supabase/",
"<rootDir>/lib/address.ts",
"<rootDir>/lib/constants.ts",
],
coverageProvider: "v8",
};
// createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async
module.exports = createJestConfig(config);