Collect coverage information for E2E tests

As proposed in https://github.com/nestjs/nest/issues/3169#issuecomment-588287478

Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
David Mehren 2020-10-03 18:00:12 +02:00
parent 108c5e670c
commit 95a809f0a3
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 17 additions and 10 deletions

16
jest-e2e.json Normal file
View file

@ -0,0 +1,16 @@
{
"moduleFileExtensions": [
"js",
"json",
"ts"
],
"rootDir": ".",
"testEnvironment": "node",
"testMatch": [
"<rootDir>/test/**/*.e2e-spec.{ts,js}"
],
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
},
"coverageDirectory": "./coverage-e2e"
}

View file

@ -19,7 +19,7 @@
"test:watch": "jest --watch", "test:watch": "jest --watch",
"test:cov": "jest --coverage", "test:cov": "jest --coverage",
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", "test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand",
"test:e2e": "jest --config ./test/jest-e2e.json" "test:e2e": "jest --config jest-e2e.json"
}, },
"dependencies": { "dependencies": {
"@nestjs/common": "^7.0.0", "@nestjs/common": "^7.0.0",

View file

@ -1,9 +0,0 @@
{
"moduleFileExtensions": ["js", "json", "ts"],
"rootDir": ".",
"testEnvironment": "node",
"testRegex": ".e2e-spec.ts$",
"transform": {
"^.+\\.(t|j)s$": "ts-jest"
}
}