diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 211920c..f485047 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -57,9 +57,9 @@ jobs: NPM_CONFIG_STRICT_SSL: false if: matrix.os == 'windows-latest' - - run: npm run tests-only + - run: ./node_modules/.bin/tape 'test/**/*.js' - uses: codecov/codecov-action@v3 - + nonlatest: needs: [matrix, latest] name: 'non-latest majors' @@ -97,7 +97,7 @@ jobs: NPM_CONFIG_STRICT_SSL: false if: matrix.os == 'windows-latest' - - run: npm run tests-only + - run: ./node_modules/.bin/tape 'test/**/*.js' - uses: codecov/codecov-action@v3 node: @@ -105,4 +105,4 @@ jobs: needs: [latest, nonlatest] runs-on: ubuntu-latest steps: - - run: 'echo tests completed' \ No newline at end of file + - run: 'echo tests completed' diff --git a/.gitignore b/.gitignore index da9c2fc..0cfeaf4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ node_modules +coverage/ +.nyc_output/ + # Only apps should have lockfiles npm-shrinkwrap.json package-lock.json diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..55c3d29 --- /dev/null +++ b/.nycrc @@ -0,0 +1,14 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "example", + "test" + ] +} diff --git a/package.json b/package.json index d0fdc46..74a7997 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "evalmd": "^0.0.19", "in-publish": "^2.0.1", "npmignore": "^0.3.0", + "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "tape": "^5.6.3" }, @@ -42,7 +43,7 @@ "prelint": "evalmd README.md", "lint": "eslint --ext=js,mjs .", "pretest": "npm run lint", - "tests-only": "tape 'test/**/*.js'", + "tests-only": "nyc tape 'test/**/*.js'", "test": "npm run tests-only", "posttest": "aud --production", "version": "auto-changelog && git add CHANGELOG.md",