Skip to content

Commit

Permalink
chore: Switch to vitest for testing
Browse files Browse the repository at this point in the history
Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Sep 28, 2024
1 parent 7c3a202 commit 22e231b
Show file tree
Hide file tree
Showing 214 changed files with 16,399 additions and 4,791 deletions.
5,546 changes: 1,724 additions & 3,822 deletions package-lock.json

Large diffs are not rendered by default.

27 changes: 15 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@
"install-vcpkg": "run-script-os",
"install-vcpkg:linux": "./scripts/cpp-install-vcpkg.sh",
"install-vcpkg:win32": "wsl -e ./scripts/cpp-install-vcpkg.sh",
"install-build-deps": "run-s install-emsdk install-vcpkg",
"install-playright": "npx playwright install",
"install-build-deps": "run-s install-emsdk install-vcpkg install-playright",
"uninstall-build-deps": "rimraf ./emsdk ./vcpkg ./src-expat ./src-vcpkg ./wasi-sdk ./wit-bindgen",
"uninstall": "rimraf --glob ./node_modules ./packages/**/node_modules ./package-lock.json",
"clean-build": "rimraf --glob .nyc_output bin build coverage output-* tmp vcpkg/vcpkg .nx",
"clean-docs": "rimraf docs/.vitepress/dist docs/.vitepress/cache docs/base91 docs/duckdb docs/expat docs/graphviz docs/zstd docs/README.md",
"clean-root": "run-p clean-build clean-docs",
"clean": "lerna run clean",
"clean-all": "run-p clean clean-root",
"copy-res": "cp ./docs/*.png ./docs/.vitepress/dist",
"build-asm": "asc ./src-asm/index.ts --target release",
"pack-duckdb": "lerna run pack-duckdb",
Expand All @@ -61,10 +63,10 @@
"lint-skypack": "lerna run lint-skypack",
"lint": "lerna run lint",
"lint-fix": "npm run lint -- --fix",
"test-node": "lerna run test-node",
"test": "lerna run test",
"coverage": "c8 npm run test-node",
"coverage-report": "c8 report --reporter=lcov",
"test-browser": "vitest run --project browser",
"test-node": "vitest run --project node",
"test": "vitest run",
"coverage": "vitest run --coverage",
"publish": "lerna publish from-package -y",
"purge-jsdelivr": "node ./utils/purge-jsdelivr.js",
"update-root": "npx -y npm-check-updates -u -t minor",
Expand All @@ -73,25 +75,25 @@
"update-major": "npm run update-major-root && lerna run update-major"
},
"devDependencies": {
"@eslint/js": "9.11.1",
"@eslint/js": "9.11.1",
"@hpcc-js/esbuild-plugins": "1.1.2",
"@types/chai": "4.3.20",
"@types/emscripten": "1.39.13",
"@types/node": "22.7.4",
"@types/yargs": "17.0.33",
"@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.7.0",
"@vitest/browser": "2.1.1",
"@vitest/coverage-istanbul": "2.1.1",
"@vitest/coverage-v8": "2.1.1",
"assemblyscript": "0.27.30",
"c8": "10.1.2",
"chai": "5.1.1",
"chokidar-cli": "3.0.0",
"eslint": "9.11.1",
"globals": "15.9.0",
"jasmine": "5.3.0",
"jasmine-browser-runner": "2.5.0",
"jasmine-core": "5.3.0",
"happy-dom": "^15.7.4",
"lerna": "8.1.8",
"npm-run-all": "4.1.5",
"playwright": "1.47.2",
"release-please": "16.14.0",
"rimraf": "6.0.1",
"run-script-os": "1.1.6",
Expand All @@ -100,7 +102,8 @@
"typedoc-plugin-markdown": "4.2.8",
"typescript": "5.6.2",
"typescript-eslint": "8.7.0",
"vitepress": "1.3.4"
"vitepress": "1.3.4",
"vitest": "2.1.1"
},
"c8": {
"exclude-after-remap": []
Expand Down
41 changes: 32 additions & 9 deletions packages/base91/.vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,30 @@
"version": "0.2.0",
"configurations": [
{
"name": "test-browser",
"type": "msedge",
"name": "test-browser-start",
"type": "node",
"request": "launch",
"url": "http://localhost:8888",
"webRoot": "${workspaceFolder}",
"outFiles": [
"${workspaceFolder}/**/*.js",
"${workspaceFolder}/**/*.c",
"!**/node_modules/**"
"program": "${workspaceRoot}/../../node_modules/vitest/vitest.mjs",
"console": "integratedTerminal",
"args": [
"run",
"--inspect-brk",
"--project",
"browser",
"--no-file-parallelism"
],
"presentation": {
"hidden": true
},
},
{
"name": "test-browser-attach",
"type": "chrome",
"request": "attach",
"port": 9229,
"presentation": {
"hidden": true
}
},
{
"name": "test-node",
Expand All @@ -27,9 +41,18 @@
],
"outFiles": [
"${workspaceFolder}/**/*.js",
"${workspaceFolder}/**/*.c",
"!**/node_modules/**"
],
}
],
"compounds": [
{
"name": "test-browser",
"configurations": [
"test-browser-attach",
"test-browser-start"
],
"stopAll": true
}
]
}
52 changes: 7 additions & 45 deletions packages/base91/.vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"version": "2.0.0",
"tasks": [
{
"label": "gen-types-watch",
"type": "npm",
"label": "build-types-watch",
"script": "build-types-watch",
"script": "gen-types-watch",
"problemMatcher": [
"$tsc-watch"
],
Expand All @@ -13,57 +13,19 @@
}
},
{
"label": "bundle-watch",
"type": "npm",
"label": "build-ts-watch",
"script": "build-ts-watch",
"problemMatcher": [
"$tsc-watch"
],
"presentation": {
"group": "group-build"
}
},
{
"type": "npm",
"label": "build-cpp-watch",
"script": "build-cpp-watch",
"options": {
"cwd": "${workspaceFolder}/../.."
},
"problemMatcher": {
"owner": "cpp",
"fileLocation": [
"relative",
"${workspaceFolder}"
],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
},
"presentation": {
"group": "group-build"
}
},
{
"type": "npm",
"label": "test-serve",
"script": "test-serve",
"script": "bundle-watch",
"problemMatcher": [],
"presentation": {
"group": "group-build"
}
},
{
"label": "build",
"dependsOn": [
"build-types-watch",
"build-ts-watch",
"build-cpp-watch",
"test-serve"
"gen-types-watch",
"bundle-watch"
],
"group": {
"kind": "build",
Expand Down
Loading

0 comments on commit 22e231b

Please sign in to comment.