Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
185 changes: 185 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"lint:check:js": "tsc --noEmit && eslint . --max-warnings 0",
"lint:fix:js": "npm run lint:check:js -- --fix",
"release": "git diff --exit-code && task package && npm publish",
"test": "vitest run"
"test:init": "PLAYWRIGHT_BROWSERS_PATH=0 npm exec playwright -- install --with-deps",
"test": "PLAYWRIGHT_BROWSERS_PATH=0 vitest run"
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Resolved
},
"type": "module",
"files": [
Expand All @@ -39,6 +40,7 @@
},
"devDependencies": {
"@types/node": "^22.19.9",
"@vitest/browser-playwright": "^4.0.18",
"eslint": "^9.39.2",
"eslint-config-yscope": "^1.1.2",
"typescript": "^5.9.3",
Expand Down
6 changes: 5 additions & 1 deletion taskfiles/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ tasks:
default:
deps: ["js"]

js:
init:
deps: [":package", ":node-modules"]
cmd: "npm run test:init"
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Resolved

js:
deps: ["init"]
cmd: "npm run test {{.CLI_ARGS}}"
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Resolved
32 changes: 29 additions & 3 deletions vitest.config.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
import {defineConfig} from "vitest/config";
import {playwright} from "@vitest/browser-playwright";


export default defineConfig({
test: {
include: ["test/**/*.test.ts"],
environment: "node",
testTimeout: 30_000,
globalSetup: "test/globalSetup.ts",
projects: [
{
test: {
name: "node",
include: ["test/**/*.test.ts"],
environment: "node",
testTimeout: 30_000,
},
},
{
test: {
name: "browser",
include: ["test/**/*.test.ts"],
testTimeout: 30_000,
browser: {
enabled: true,
provider: playwright(),
instances: [
{browser: "chromium"},
{browser: "firefox"},
{browser: "webkit"},
],
headless: true,
},
},
},
],
Comment thread
Bill-hbrhbr marked this conversation as resolved.
Resolved
},
});
Loading