Skip to content

Commit

Permalink
chore: update dependencies (#1045)
Browse files Browse the repository at this point in the history
Most notably `tap`.
  • Loading branch information
targos authored Jan 11, 2024
1 parent 92ee01f commit 44548b7
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 26 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ node_modules/
test/scaffold/*/node_modules
test/.*
coverage/
/.tap
.nyc_output/
.eslintcache
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"scripts": {
"lint": "eslint bin/* lib/ test/ --cache",
"tap": "c8 --reporter lcov tap --no-coverage \"test/**/test-*.js\"",
"tap": "tap run \"test/**/test-*.js\"",
"test": "npm run lint && npm run tap"
},
"author": "James M Snell <[email protected]> (http://jasnell.me)",
Expand All @@ -31,40 +31,39 @@
"license": "MIT",
"dependencies": {
"async": "^3.2.5",
"bl": "^6.0.9",
"bl": "^6.0.10",
"chalk": "^5.3.0",
"columnify": "^1.6.0",
"execa": "^8.0.1",
"lodash": "^4.17.21",
"normalize-git-url": "^3.0.2",
"npm-package-arg": "^11.0.1",
"npm-which": "^3.0.1",
"pnpm": "^8.13.1",
"pnpm": "^8.14.0",
"read-package-json": "^7.0.0",
"root-check": "^2.0.0",
"semver": "^7.5.4",
"strip-ansi": "^7.1.0",
"supports-color": "^9.4.0",
"tar": "^6.2.0",
"uid-number": "0.0.6",
"undici": "^6.2.1",
"undici": "^6.3.0",
"which": "^4.0.0",
"winston": "^3.11.0",
"xml-sanitizer": "^1.2.9",
"xml-sanitizer": "^2.0.0",
"xmlbuilder": "^15.1.1",
"yargs": "^17.7.2",
"yarn": "^1.22.21"
},
"devDependencies": {
"ansi-regex": "^6.0.1",
"c8": "^8.0.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.2",
"eslint-plugin-prettier": "^5.1.3",
"prettier": "^3.1.1",
"string-to-stream": "^3.0.1",
"tap": "^16.3.8",
"tap-parser": "^11.0.1",
"tap": "^18.6.1",
"tap-parser": "^15.3.1",
"xml2js": "^0.6.2"
},
"prettier": {
Expand All @@ -82,7 +81,7 @@
},
"tap": {
"timeout": 480,
"check-coverage": false
"allow-incomplete-coverage": true
},
"engines": {
"node": "18.x || 20.x || 21.x"
Expand Down
52 changes: 38 additions & 14 deletions test/fixtures/parsed-tap.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,52 @@
{
"bailout": false,
"ok": false,
"count": 3,
"pass": 2,
"fail": 1,
"bailout": false,
"todo": 0,
"skip": 1,
"failures": [
{
"diag": {
"duration_ms": 50
},
"id": 3,
"ok": false,
"name": "iFail v3.0.1 I dun wurk",
"fullname": "",
"ok": false
"id": 3,
"buffered": false,
"tapError": null,
"skip": false,
"todo": false,
"previous": null,
"plan": null,
"diag": {},
"time": 50,
"fullname": "iFail v3.0.1 I dun wurk",
"closingTestPoint": false
}
],
"ok": false,
"pass": 2,
"time": null,
"plan": {
"comment": "",
"start": 1,
"end": 3,
"skipAll": false,
"skipReason": "",
"end": 3
"comment": ""
},
"skip": 1,
"todo": 0,
"time": null
"skips": [
{
"ok": true,
"name": "iFlakyFail v3.3.3",
"id": 2,
"buffered": false,
"tapError": null,
"skip": "I dun wurk",
"todo": false,
"previous": null,
"plan": null,
"diag": {},
"time": 50,
"fullname": "iFlakyFail v3.3.3",
"closingTestPoint": false
}
],
"todos": []
}
7 changes: 5 additions & 2 deletions test/reporter/test-reporter-tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { tmpdir } from 'os';
import { fileURLToPath } from 'url';

import tap from 'tap';
import Parser from 'tap-parser';
import { Parser } from 'tap-parser';
import str from 'string-to-stream';

import tapReporter from '../../lib/reporter/tap.js';
Expand Down Expand Up @@ -92,7 +92,10 @@ test('reporter.tap(): parser', (t) => {

tapReporter(logger, failingInput);
const p = new Parser((results) => {
t.same(results, tapParserExpected),
// `results` contains JS classes that are not considered same as the
// plain objects loaded from the JSON file.
const plainResults = JSON.parse(JSON.stringify(results));
t.same(plainResults, tapParserExpected),
'the tap parser should correctly' + ' parse the tap file';
t.end();
});
Expand Down

0 comments on commit 44548b7

Please sign in to comment.