@fordi-org/test-init
v1.0.4
Published
Quick setup for minimalist native testing with coverage
Maintainers
Readme
Native Test Init
This command will set up Node's native test runner, with coverage support, under the package script node:test.
There is no installation necessary. To use it:
npx '@fordi-org/test-init'Installing c8
Creating .c8rc (test reporter config) with basic defaults
Adding test runner scriptThis is equivalent to:
- Running
npm i -D c8 - Creating
.c8rcwith the content:{ "reporter": [ "html" ], "all": true, "reportDir": "./coverage", "src": ".", "include": [ "*", "**/*" ], "exclude": [ "coverage/**/*", "*.test/**/*", "**/*.test*" ], "checkCoverage": true, "lines": 75, "functions": 75, "statements": 75, "branches": 75 } - Adding the script
"node:test": "c8 -- node --test"
