Skip to content

Commit

Permalink
test: use vitest v1 (#478)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 authored Dec 5, 2023
1 parent 45e6fe0 commit 5bb3a62
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
uses: node-modules/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest, macos-latest, windows-latest'
version: '14.19.3, 14, 16, 18, 20'
version: '14.19.3, 16, 18, 20'
install: 'npx npminstall'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@types/qs": "^6.9.7",
"@types/selfsigned": "^2.0.1",
"@types/tar-stream": "^2.2.2",
"@vitest/coverage-v8": "beta",
"@vitest/coverage-v8": "^1.0.1",
"busboy": "^1.6.0",
"cross-env": "^7.0.3",
"eslint": "^8.25.0",
Expand All @@ -82,7 +82,7 @@
"tshy": "^1.0.0",
"tshy-after": "^1.0.0",
"typescript": "^5.0.4",
"vitest": "beta"
"vitest": "^1.0.1"
},
"engines": {
"node": ">= 14.19.3"
Expand Down
4 changes: 2 additions & 2 deletions scripts/pre_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ function main() {
if (!process.version.startsWith('v14.')) {
return;
}
console.log(`use vitest@^0.32.0 on Node.js ${process.version}`);
console.log(`use vitest@^0.33.0 on Node.js ${process.version}`);
const cwd = process.cwd()
execSync('npm i vitest@^0.32.0 @vitest/coverage-v8@^0.32.0', {
execSync('npm i vitest@^0.33.0 @vitest/coverage-v8@^0.33.0', {
cwd,
stdio: [ 'inherit', 'inherit', 'inherit' ],
});
Expand Down
2 changes: 1 addition & 1 deletion test/options.timeout.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('options.timeout.test.ts', () => {
it('should timeout 500ms throw error', async () => {
await assert.rejects(async () => {
const response = await urllib.request(`${_url}mock-bytes?timeout=1000`, {
timeout: [ 100, 500 ],
timeout: [ 400, 500 ],
});
console.log(response.status, response.headers, response.data);
}, (err: any) => {
Expand Down

0 comments on commit 5bb3a62

Please sign in to comment.