Skip to content

Commit

Permalink
Exclude unnecessary files from test coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
joonashak committed Sep 17, 2024
1 parent 1269368 commit aa0b10c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions app/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
import type { Config } from "jest";

const config: Config = {
testEnvironment: "node",
moduleFileExtensions: ["js", "json", "ts"],
rootDir: "src",
testRegex: ".*\\.spec\\.ts$",
transform: {
"^.+\\.(t|j)s$": "ts-jest",
"^.+\\.(ts|js)$": "ts-jest",
},
collectCoverageFrom: ["**/*.(t|j)s"],
coverageProvider: "v8",
collectCoverageFrom: ["**/*.(ts|js)"],
coverageDirectory: "../coverage",
testEnvironment: "node",
coveragePathIgnorePatterns: [
".module.ts$",
".model.ts$",
".dto.ts$",
"src/database/migrations",
"src/main.ts",
],
};

export default config;

0 comments on commit aa0b10c

Please sign in to comment.