Skip to content

Commit

Permalink
Fix tests (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix authored Jun 7, 2024
1 parent 742068e commit 7865264
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
Expand All @@ -23,5 +25,5 @@ jobs:
if: always()
with:
name: playwright-report
path: playwright-report/
path: test-results
retention-days: 30
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm test
npm run lint
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"description": "Blocknotes",
"main": "index.js",
"scripts": {
"server": "http-server ./dist -p 3000",
"start": "vite build --watch",
"build": "vite build",
"sync": "npm run build && cap sync",
"preview": "vite preview",
"test": "standard",
"test": "playwright test",
"lint": "standard",
"prepare": "husky install"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = defineConfig({

/* Run your local dev server before starting the tests */
webServer: {
command: 'http-server ./dist -p 3000',
command: 'npm run server',
port: 3000,
reuseExistingServer: !process.env.CI
}
Expand Down

0 comments on commit 7865264

Please sign in to comment.