mirror of
https://github.com/frontendnetwork/vegancheck.me
synced 2024-11-13 23:57:09 +00:00
31 lines
830 B
TypeScript
31 lines
830 B
TypeScript
import type { Config } from "jest";
|
|
import nextJest from "next/jest";
|
|
|
|
const createJestConfig = nextJest({
|
|
dir: "./",
|
|
});
|
|
|
|
const customJestConfig: Config = {
|
|
setupFilesAfterEnv: ["<rootDir>/src/tests/setup.ts"],
|
|
testEnvironment: "jest-environment-jsdom",
|
|
moduleNameMapper: {
|
|
"^@/(.*)$": "<rootDir>/src/$1",
|
|
},
|
|
testMatch: ["**/*.test.ts", "**/*.test.tsx"],
|
|
collectCoverage: true,
|
|
coverageDirectory: "coverage",
|
|
coverageReporters: ["text", "lcov", "json"],
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json"],
|
|
testPathIgnorePatterns: [
|
|
"<rootDir>/node_modules/",
|
|
"<rootDir>/.next/",
|
|
"<rootDir>/playwright/",
|
|
],
|
|
transformIgnorePatterns: [
|
|
"/node_modules/",
|
|
"^.+\\.module\\.(css|sass|scss)$",
|
|
],
|
|
coverageProvider: "v8",
|
|
};
|
|
|
|
export default createJestConfig(customJestConfig);
|