Skip to content

Commit

Permalink
23
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Nov 23, 2024
1 parent 2207519 commit 78f5c5d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest, macos-latest, windows-latest'
version: '18.19.0, 18, 20, 22'
version: '18.19.0, 18, 20, 22, 23'
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion test/HttpClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('HttpClient.test.ts', () => {
httpClient.request(_url),
]);
console.log(httpClient.getDispatcherPoolStats());
assert.equal(httpClient.getDispatcherPoolStats()['https://registry.npmmirror.com'].connected, 1);
assert.equal(httpClient.getDispatcherPoolStats()['https://registry.npmmirror.com'].connected, 4);
assert(httpClient.getDispatcherPoolStats()[_url.substring(0, _url.length - 1)].connected > 1);
});
});
Expand Down
9 changes: 7 additions & 2 deletions test/options.writeStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,13 @@ describe('options.writeStream.test.ts', () => {
// only Node.js >= 18 has stream.emitError
if (err.message !== 'writeStream is destroyed') {
assert.equal(err.name, 'Error');
assert.equal(err.code, 'ENOENT');
assert.match(err.message, /no such file or directory/);
assert.match(err.code, /^ENOENT|ERR_STREAM_UNABLE_TO_PIPE$/);
if (err.code === 'ERR_STREAM_UNABLE_TO_PIPE') {
// change to ERR_STREAM_UNABLE_TO_PIPE on Node.js >= 23
assert.equal(err.message, 'Cannot pipe to a closed or destroyed stream');
} else {
assert.match(err.message, /no such file or directory/);
}
}
return true;
});
Expand Down

0 comments on commit 78f5c5d

Please sign in to comment.