Skip to content

Commit 0e96937

Browse files
authored
Vitest config updates (#65)
* Install chromium in CI * Enable headless mode * Ignore vitest screenshots
1 parent e735bb1 commit 0e96937

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
run: npm ci
3131
- name: npm build
3232
run: npm run build --if-present
33+
- run: npx playwright install chromium
3334
- name: npm test
3435
run: npm test
3536
env:

.github/workflows/publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
registry-url: https://registry.npmjs.org/
2020
cache: npm
2121
- run: npm ci
22+
- run: npx playwright install chromium
2223
- run: npm test
2324
- run: npm version ${TAG_NAME} --git-tag-version=false
2425
env:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ jobs:
2525
uses: actions/checkout@v4
2626
- name: Preparation
2727
uses: ./.github/actions/setup
28+
- run: npx playwright install chromium
2829
- name: Perform last-minute tests
2930
run: npm test
3031
- name: Configure Git

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
dist
22
node_modules
3+
test/__screenshots__

vitest.config.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,10 @@ export default defineConfig({
66
browser: {
77
enabled: true,
88
provider: 'playwright',
9+
headless: true,
910
instances: [
1011
{
11-
browser: 'chromium',
12-
launch: {
13-
executablePath: '/usr/bin/chromium-browser'
14-
}
12+
browser: 'chromium'
1513
}
1614
]
1715
}

0 commit comments

Comments
 (0)