Nest.js/TDD

nestjs-test-coverage에서 제외 파일 설정

Dev갱이 2024. 3. 9. 20:17
728x90

- Reference

https://jestjs.io/docs/configuration#coveragepathignorepatterns-arraystring

 

Configuring Jest · Jest

The Jest philosophy is to work great by default, but sometimes you just need more configuration power.

jestjs.io

 

//package.json

{
 
 	...
 
    "coverageDirectory": "../coverage",
    "testEnvironment": "node",
    "coveragePathIgnorePatterns": [
      "<rootDir>/main.ts",
      "<rootDir>/app.module.ts"
    ]
  }
}
728x90