Skip to content

Commit 04c0bb0

Browse files
authored
Merge pull request #4 from jsanzdev/TestingLab/FixingVitest
2 parents 638ee12 + 8a583e9 commit 04c0bb0

3 files changed

Lines changed: 1110 additions & 891 deletions

File tree

.github/workflows/testing-lab.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
name: Testing Lab CI
22

3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
types: [opened, synchronize, reopened]
3+
on: pull_request
94

105
jobs:
116
test:
@@ -27,8 +22,11 @@ jobs:
2722
- name: Install dependencies
2823
run: npm ci
2924

25+
- name: Install Playwright Browsers
26+
run: npx playwright install --with-deps
27+
3028
- name: Run tests
3129
run: npm test
3230

3331
- name: Run E2E tests
34-
run: npm run e2e
32+
run: npm run test:e2e
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import { defineConfig } from 'vitest/config';
1+
import { defineConfig, configDefaults } from "vitest/config";
22

33
export default defineConfig({
44
test: {
55
globals: true,
66
restoreMocks: true,
7-
environment: 'jsdom',
8-
setupFiles: ['./config/test/setup.ts'],
7+
environment: "jsdom",
8+
setupFiles: ["./config/test/setup.ts"],
9+
include: ["./src/**/*.spec.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
10+
exclude: [...configDefaults.exclude, "e2e/*"],
911
},
1012
});

0 commit comments

Comments
 (0)