Skip to content

Commit ffd8418

Browse files
committed
chore: Switch to vitest for testing
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1 parent 0ab9291 commit ffd8418

File tree

214 files changed

+17257
-2783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

214 files changed

+17257
-2783
lines changed

package-lock.json

Lines changed: 2573 additions & 1804 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,15 @@
2828
"install-vcpkg": "run-script-os",
2929
"install-vcpkg:linux": "./scripts/cpp-install-vcpkg.sh",
3030
"install-vcpkg:win32": "wsl -e ./scripts/cpp-install-vcpkg.sh",
31-
"install-build-deps": "run-s install-emsdk install-vcpkg",
31+
"install-playright": "npx playwright install",
32+
"install-build-deps": "run-s install-emsdk install-vcpkg install-playright",
3233
"uninstall-build-deps": "rimraf ./emsdk ./vcpkg ./src-expat ./src-vcpkg ./wasi-sdk ./wit-bindgen",
3334
"uninstall": "rimraf --glob ./node_modules ./packages/**/node_modules ./package-lock.json",
3435
"clean-build": "rimraf --glob .nyc_output bin build coverage output-* tmp vcpkg/vcpkg .nx",
3536
"clean-docs": "rimraf docs/.vitepress/dist docs/.vitepress/cache docs/base91 docs/duckdb docs/expat docs/graphviz docs/zstd docs/README.md",
3637
"clean-root": "run-p clean-build clean-docs",
3738
"clean": "lerna run clean",
39+
"clean-all": "run-p clean clean-root",
3840
"copy-res": "cp ./docs/*.png ./docs/.vitepress/dist",
3941
"build-asm": "asc ./src-asm/index.ts --target release",
4042
"pack-duckdb": "lerna run pack-duckdb",
@@ -61,10 +63,10 @@
6163
"lint-skypack": "lerna run lint-skypack",
6264
"lint": "lerna run lint",
6365
"lint-fix": "npm run lint -- --fix",
64-
"test-node": "lerna run test-node",
65-
"test": "lerna run test",
66-
"coverage": "c8 npm run test-node",
67-
"coverage-report": "c8 report --reporter=lcov",
66+
"test-browser": "vitest run --project browser",
67+
"test-node": "vitest run --project node",
68+
"test": "vitest run",
69+
"coverage": "vitest run --coverage",
6870
"publish": "lerna publish from-package -y",
6971
"purge-jsdelivr": "node ./utils/purge-jsdelivr.js",
7072
"update-root": "npx -y npm-check-updates -u -t minor",
@@ -73,34 +75,34 @@
7375
"update-major": "npm run update-major-root && lerna run update-major"
7476
},
7577
"devDependencies": {
76-
"@eslint/js": "9.10.0",
78+
"@eslint/js": "9.11.1",
7779
"@hpcc-js/esbuild-plugins": "1.1.2",
78-
"@types/chai": "4.3.19",
7980
"@types/emscripten": "1.39.13",
80-
"@types/node": "22.5.5",
81+
"@types/node": "22.7.3",
8182
"@types/yargs": "17.0.33",
82-
"@typescript-eslint/eslint-plugin": "8.6.0",
83-
"@typescript-eslint/parser": "8.6.0",
84-
"assemblyscript": "0.27.29",
85-
"c8": "10.1.2",
86-
"chai": "5.1.1",
83+
"@typescript-eslint/eslint-plugin": "8.7.0",
84+
"@typescript-eslint/parser": "8.7.0",
85+
"@vitest/browser": "2.1.1",
86+
"@vitest/coverage-istanbul": "2.1.1",
87+
"@vitest/coverage-v8": "2.1.1",
88+
"assemblyscript": "0.27.30",
8789
"chokidar-cli": "3.0.0",
88-
"eslint": "9.10.0",
90+
"eslint": "9.11.1",
8991
"globals": "15.9.0",
90-
"jasmine": "5.3.0",
91-
"jasmine-browser-runner": "2.5.0",
92-
"jasmine-core": "5.3.0",
92+
"happy-dom": "^15.7.4",
9393
"lerna": "8.1.8",
9494
"npm-run-all": "4.1.5",
95-
"release-please": "16.13.0",
95+
"playwright": "1.47.2",
96+
"release-please": "16.14.0",
9697
"rimraf": "6.0.1",
9798
"run-script-os": "1.1.6",
9899
"tslib": "2.7.0",
99100
"typedoc": "0.26.7",
100-
"typedoc-plugin-markdown": "4.2.7",
101+
"typedoc-plugin-markdown": "4.2.8",
101102
"typescript": "5.6.2",
102-
"typescript-eslint": "8.6.0",
103-
"vitepress": "1.3.4"
103+
"typescript-eslint": "8.7.0",
104+
"vitepress": "1.3.4",
105+
"vitest": "2.1.1"
104106
},
105107
"c8": {
106108
"exclude-after-remap": []

packages/base91/.vscode/launch.json

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,30 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"name": "test-browser",
6-
"type": "msedge",
5+
"name": "test-browser-start",
6+
"type": "node",
77
"request": "launch",
8-
"url": "http://localhost:8888",
9-
"webRoot": "${workspaceFolder}",
10-
"outFiles": [
11-
"${workspaceFolder}/**/*.js",
12-
"${workspaceFolder}/**/*.c",
13-
"!**/node_modules/**"
8+
"program": "${workspaceRoot}/../../node_modules/vitest/vitest.mjs",
9+
"console": "integratedTerminal",
10+
"args": [
11+
"run",
12+
"--inspect-brk",
13+
"--project",
14+
"browser",
15+
"--no-file-parallelism"
1416
],
17+
"presentation": {
18+
"hidden": true
19+
},
20+
},
21+
{
22+
"name": "test-browser-attach",
23+
"type": "chrome",
24+
"request": "attach",
25+
"port": 9229,
26+
"presentation": {
27+
"hidden": true
28+
}
1529
},
1630
{
1731
"name": "test-node",
@@ -27,9 +41,18 @@
2741
],
2842
"outFiles": [
2943
"${workspaceFolder}/**/*.js",
30-
"${workspaceFolder}/**/*.c",
3144
"!**/node_modules/**"
3245
],
3346
}
47+
],
48+
"compounds": [
49+
{
50+
"name": "test-browser",
51+
"configurations": [
52+
"test-browser-attach",
53+
"test-browser-start"
54+
],
55+
"stopAll": true
56+
}
3457
]
3558
}

packages/base91/.vscode/tasks.json

Lines changed: 7 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5+
"label": "gen-types-watch",
56
"type": "npm",
6-
"label": "build-types-watch",
7-
"script": "build-types-watch",
7+
"script": "gen-types-watch",
88
"problemMatcher": [
99
"$tsc-watch"
1010
],
@@ -13,57 +13,19 @@
1313
}
1414
},
1515
{
16+
"label": "bundle-watch",
1617
"type": "npm",
17-
"label": "build-ts-watch",
18-
"script": "build-ts-watch",
19-
"problemMatcher": [
20-
"$tsc-watch"
21-
],
22-
"presentation": {
23-
"group": "group-build"
24-
}
25-
},
26-
{
27-
"type": "npm",
28-
"label": "build-cpp-watch",
29-
"script": "build-cpp-watch",
30-
"options": {
31-
"cwd": "${workspaceFolder}/../.."
32-
},
33-
"problemMatcher": {
34-
"owner": "cpp",
35-
"fileLocation": [
36-
"relative",
37-
"${workspaceFolder}"
38-
],
39-
"pattern": {
40-
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
41-
"file": 1,
42-
"line": 2,
43-
"column": 3,
44-
"severity": 4,
45-
"message": 5
46-
}
47-
},
48-
"presentation": {
49-
"group": "group-build"
50-
}
51-
},
52-
{
53-
"type": "npm",
54-
"label": "test-serve",
55-
"script": "test-serve",
18+
"script": "bundle-watch",
19+
"problemMatcher": [],
5620
"presentation": {
5721
"group": "group-build"
5822
}
5923
},
6024
{
6125
"label": "build",
6226
"dependsOn": [
63-
"build-types-watch",
64-
"build-ts-watch",
65-
"build-cpp-watch",
66-
"test-serve"
27+
"gen-types-watch",
28+
"bundle-watch"
6729
],
6830
"group": {
6931
"kind": "build",

0 commit comments

Comments
 (0)