Skip to content

Commit

Permalink
Add Hereby test target
Browse files Browse the repository at this point in the history
  • Loading branch information
jthemphill committed Feb 28, 2025
1 parent e2274cf commit 69c49ad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,20 @@ export const preview = task({
dependencies: [build],
});

export const test = task({
name: "test",
run: async () => {
await exec("pnpm", ["run", "test:headless"], { cwd: "www" });
},
dependencies: [install],
});

export const deploy = task({
name: "deploy",
run: async () => {
await exec("pnpm", ["run", "deploy:pages"], { cwd: "www" });
},
dependencies: [build, install],
dependencies: [build, install, test],
});

/**
Expand Down
4 changes: 2 additions & 2 deletions www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"scripts": {
"dev": "vite",
"test": "vitest",
"test:headless": "vitest run --browser.headless",
"typecheck": "tsc",
"build": "vite build",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview",
"deploy:pages": "gh-pages -d ./dist",
"test:browser": "vitest --workspace=vitest.workspace.ts"
"deploy:pages": "gh-pages -d ./dist"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 69c49ad

Please sign in to comment.