Skip to content

Commit 5d4a11e

Browse files
committed
add test:coverage command
1 parent 9eab9a8 commit 5d4a11e

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,4 @@ typings/
8787
# DynamoDB Local files
8888
.dynamodb/
8989
.DS_Store
90+
lcov.info

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
"scripts": {
66
"test": "node --test ./src/migrated/*.test.js",
77
"dev": "node --test --watch ./src/migrated/*.test.js",
8-
"test:all": "npm t && npm run test:only && npm run test:seq && npm run test:par",
8+
"test:all": "npm run test:coverage && npm run test:only && npm run test:seq && npm run test:par",
9+
"test:coverage": "node --test --experimental-test-coverage ./src/migrated/*.test.js",
10+
"test:coverage:file": "node --test --experimental-test-coverage --test-reporter=lcov --test-reporter-destination=lcov.info ./src/migrated/*.test.js",
11+
"report:html": "npx @lcov-viewer/cli lcov -o ./coverage ./lcov.info",
912
"test:seq": "node --test --test-concurrency=1 ./src/migrated/*.test.js",
1013
"test:par": "node --test --test-concurrency=5 ./src/migrated/*.test.js",
1114
"test:only": "node --test --test-only src/migrated/*.only.js",

0 commit comments

Comments
 (0)