diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..404abb2 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +coverage/ diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..1826526 --- /dev/null +++ b/.nycrc @@ -0,0 +1,13 @@ +{ + "all": true, + "check-coverage": false, + "reporter": ["text-summary", "text", "html", "json"], + "lines": 86, + "statements": 85.93, + "functions": 82.43, + "branches": 76.06, + "exclude": [ + "coverage", + "test" + ] +} diff --git a/package.json b/package.json index 4379da1..394c109 100644 --- a/package.json +++ b/package.json @@ -13,11 +13,12 @@ }, "scripts": { "prepublish": "safe-publish-latest", - "lint": "eslint .", + "lint": "eslint --ext=js,mjs .", "pretest": "npm run lint", - "tests-only": "node test", - "test": "npm run tests-only", - "posttest": "npx aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "test:harmony": "nyc node --harmony --es-staging test", + "test": "npm run tests-only && npm run test:harmony", + "posttest": "aud --production", "version": "auto-changelog && git add CHANGELOG.md", "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, @@ -53,6 +54,7 @@ "aud": "^1.1.1", "auto-changelog": "^2.0.0", "eslint": "^6.8.0", + "nyc": "^10.3.2", "safe-publish-latest": "^1.1.4", "tape": "^5.0.0-next.5" },