@fordi-org/test-init

1.0.4 • Public • Published

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 script

This is equivalent to:

  1. Running npm i -D c8
  2. Creating .c8rc with the content:
    {
      "reporter": [
        "html"
      ],
      "all": true,
      "reportDir": "./coverage",
      "src": ".",
      "include": [
        "*",
        "**/*"
      ],
      "exclude": [
        "coverage/**/*",
        "*.test/**/*",
        "**/*.test*"
      ],
      "checkCoverage": true,
      "lines": 75,
      "functions": 75,
      "statements": 75,
      "branches": 75
    }
  3. Adding the script "node:test": "c8 -- node --test"

Package Sidebar

Install

npm i @fordi-org/test-init

Weekly Downloads

0

Version

1.0.4

License

ISC

Unpacked Size

3.14 kB

Total Files

5

Last publish

Collaborators

  • fordi-org