Skip to content

Commit

Permalink
chore(tests): collect coverage from all files, not only included in t…
Browse files Browse the repository at this point in the history
…ests (#1406)
  • Loading branch information
timofei-iatsenko authored Feb 6, 2023
1 parent 617a333 commit 8579090
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const tsConfig = require( './tsconfig.json');
const { pathsToModuleNameMapper } = require("ts-jest/utils")
const tsConfig = require("./tsconfig.json")

/**
* @type {import('jest').Config}
Expand All @@ -12,6 +12,12 @@ module.exports = {
testURL: "http://localhost",

collectCoverage: true,
collectCoverageFrom: [
"**/*.{ts,tsx}",
"!**/*.d.ts",
"!**/node_modules/**",
"!**/build/**",
],
coverageDirectory: "<rootDir>/coverage/",
coveragePathIgnorePatterns: [
"node_modules",
Expand All @@ -25,11 +31,11 @@ module.exports = {
coverageReporters: ["html", "lcov", "text"],
modulePathIgnorePatterns: ["/build"],
moduleNameMapper: pathsToModuleNameMapper(tsConfig.compilerOptions.paths, {
prefix: '<rootDir>/',
prefix: "<rootDir>/",
}),

reporters: ["default", "jest-junit"],
setupFiles: ['set-tz/utc'],
setupFiles: ["set-tz/utc"],
setupFilesAfterEnv: [require.resolve("./scripts/jest/env.js")],
snapshotSerializers: [
"jest-serializer-html",
Expand Down

1 comment on commit 8579090

@vercel
Copy link

@vercel vercel bot commented on 8579090 Feb 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.