Skip to content

Commit cb5d3b9

Browse files
authored
Merge pull request #2 from moufmouf/copilot/migrate-to-vitest
Migrate test framework from tape to vitest
2 parents d833e31 + 622325c commit cb5d3b9

22 files changed

+2308
-1952
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
tags-ignore:
77
- '*'
88
pull_request:
9-
branches:
10-
- master
9+
# branches:
10+
# - master
1111
concurrency:
1212
group: ${{ github.ref }}
1313
cancel-in-progress: true
@@ -32,7 +32,7 @@ jobs:
3232
- name: Setup PNPM
3333
uses: pnpm/action-setup@v4
3434
with:
35-
version: 8.6.3
35+
version: 8.8.0
3636

3737
- name: Setup Node
3838
uses: actions/setup-node@v3

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,22 @@
2424
"@types/debug": "^4.1.12",
2525
"@types/node": "^24.10.2",
2626
"@types/streamx": "^2.9.5",
27-
"@types/tape": "^5.8.1",
2827
"@types/webrtc": "^0.0.47",
28+
"@vitest/browser": "^4.0.15",
2929
"airtap": "^4.0.4",
3030
"airtap-manual": "^1.0.0",
3131
"airtap-system": "^0.1.0",
3232
"babelify": "^10.0.0",
3333
"bowser": "^2.11.0",
3434
"cross-env": "^7.0.3",
35+
"happy-dom": "^20.0.11",
3536
"prettier-bytes": "^1.0.4",
3637
"speedometer": "^1.1.0",
3738
"string-to-stream": "^3.0.1",
38-
"tap-spec": "^5.0.0",
39-
"tape": "^5.9.0",
4039
"thunky": "^1.1.0",
4140
"typescript": "^5.9.3",
41+
"vite": "^7.2.7",
42+
"vitest": "^4.0.15",
4243
"ws": "^8.18.0"
4344
},
4445
"keywords": [
@@ -81,15 +82,14 @@
8182
"url": "git://github.com/thaunknown/simple-peer.git"
8283
},
8384
"scripts": {
84-
"build": "tsc && cd test && npx tsc",
85+
"build": "tsc",
8586
"prebuild": "rm -rf dist",
8687
"prepublishOnly": "npm run build",
87-
"test": "npm run build && npm run test:no-build",
88-
"test:no-build": "npm run test-node && npm run test-browser",
88+
"test": "npm run build && vitest run",
89+
"test:watch": "vitest",
90+
"test-node": "vitest run",
8991
"test-browser": "airtap --concurrency 1 --all -- test/*.js test/browser/*.js | tap-spec",
90-
"test-browser-local": "airtap --preset local -- test/*.js | tap-spec",
91-
"test-node": "tape test/*.js",
92-
"test-node-debug": "cross-env DEBUG=* tape test/negotiation.js"
92+
"test-browser-local": "airtap --preset local -- test/*.js | tap-spec"
9393
},
9494
"contributors": [
9595
{

0 commit comments

Comments
 (0)