Skip to content

Commit 45143b6

Browse files
committed
[Tests] use nyc for coverage
1 parent 5d55ddc commit 45143b6

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,6 @@ indent_size = 2
3232
[LICENSE]
3333
indent_size = 2
3434
max_line_length = off
35+
36+
[.nycrc]
37+
indent_style = tab

.nycrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"all": true,
3+
"check-coverage": false,
4+
"reporter": ["text-summary", "text", "html", "json"],
5+
"lines": 86,
6+
"statements": 85.93,
7+
"functions": 82.43,
8+
"branches": 76.06,
9+
"exclude": [
10+
"coverage",
11+
"dist"
12+
]
13+
}

package.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"devDependencies": {
3333
"@ljharb/eslint-config": "^20.1.0",
3434
"browserify": "^16.5.2",
35-
"covert": "^1.1.1",
3635
"eclint": "^2.8.1",
3736
"eslint": "^8.6.0",
3837
"evalmd": "^0.0.19",
@@ -41,6 +40,7 @@
4140
"iconv-lite": "^0.5.1",
4241
"in-publish": "^2.0.1",
4342
"mkdirp": "^0.5.4",
43+
"nyc": "^10.3.2",
4444
"object-inspect": "^1.12.0",
4545
"qs-iconv": "^1.0.4",
4646
"safe-publish-latest": "^2.0.0",
@@ -51,13 +51,12 @@
5151
"prepublishOnly": "safe-publish-latest && npm run dist",
5252
"prepublish": "not-in-publish || npm run prepublishOnly",
5353
"pretest": "npm run --silent readme && npm run --silent lint",
54-
"test": "npm run --silent coverage",
55-
"tests-only": "node test",
54+
"test": "npm run --silent tests-only",
55+
"tests-only": "nyc tape 'test/**/*.js'",
5656
"posttest": "npx aud --production",
5757
"readme": "evalmd README.md",
5858
"postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
5959
"lint": "eslint lib/*.js test/*.js",
60-
"coverage": "covert test",
6160
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
6261
},
6362
"license": "BSD-3-Clause"

0 commit comments

Comments
 (0)