From 95a809f0a394cd9d6349f0410a574596f64be4a2 Mon Sep 17 00:00:00 2001 From: David Mehren Date: Sat, 3 Oct 2020 18:00:12 +0200 Subject: [PATCH] Collect coverage information for E2E tests As proposed in https://github.com/nestjs/nest/issues/3169#issuecomment-588287478 Signed-off-by: David Mehren --- jest-e2e.json | 16 ++++++++++++++++ package.json | 2 +- test/jest-e2e.json | 9 --------- 3 files changed, 17 insertions(+), 10 deletions(-) create mode 100644 jest-e2e.json delete mode 100644 test/jest-e2e.json diff --git a/jest-e2e.json b/jest-e2e.json new file mode 100644 index 000000000..8169517cb --- /dev/null +++ b/jest-e2e.json @@ -0,0 +1,16 @@ +{ + "moduleFileExtensions": [ + "js", + "json", + "ts" + ], + "rootDir": ".", + "testEnvironment": "node", + "testMatch": [ + "/test/**/*.e2e-spec.{ts,js}" + ], + "transform": { + "^.+\\.(t|j)s$": "ts-jest" + }, + "coverageDirectory": "./coverage-e2e" +} diff --git a/package.json b/package.json index 8f7006537..4b6dd5c77 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test:watch": "jest --watch", "test:cov": "jest --coverage", "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": { "@nestjs/common": "^7.0.0", diff --git a/test/jest-e2e.json b/test/jest-e2e.json deleted file mode 100644 index e9d912f3e..000000000 --- a/test/jest-e2e.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "moduleFileExtensions": ["js", "json", "ts"], - "rootDir": ".", - "testEnvironment": "node", - "testRegex": ".e2e-spec.ts$", - "transform": { - "^.+\\.(t|j)s$": "ts-jest" - } -}