diff --git a/.gitignore b/.gitignore index ed8594f..2e00e49 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ node_modules/ *.sw* +coverage/ diff --git a/package.json b/package.json index eeb349b..3ac0c57 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,12 @@ "winston": "^3.1.0" }, "jest": { + "collectCoverage": true, + "coverageReporters": [ + "json", + "lcov", + "text" + ], "transform": { "^.+\\.tsx?$": "ts-jest" }, diff --git a/test/app.test.ts b/test/app.test.ts index 14590e0..6b6a458 100644 --- a/test/app.test.ts +++ b/test/app.test.ts @@ -3,7 +3,8 @@ import request from 'request-promise'; import app from '../src/app'; -const port = app.get('port') || 3030; +// Offsetting a bit to ensure that we can watch and run at the same time +const port = (app.get('port') || 3030) + 10; const getUrl = pathname => url.format({ hostname: app.get('host') || 'localhost', protocol: 'http',