Skip to content

Commit 962e091

Browse files
authored
Merge pull request #400 from ixartz/vitest-browser-3
Replace testing-library by Vitest browser mode
2 parents 9e6127f + 4340f37 commit 962e091

File tree

36 files changed

+2577
-3147
lines changed

36 files changed

+2577
-3147
lines changed

.github/workflows/CI.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ jobs:
6060
- name: Type checking
6161
run: npm run check-types
6262

63+
- name: Install Playwright (used for Storybook and E2E tests)
64+
run: npx playwright install --with-deps
65+
6366
- name: Run unit tests
6467
run: npm run test -- --coverage
6568

@@ -68,9 +71,6 @@ jobs:
6871
env:
6972
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
7073

71-
- name: Install Playwright (used for Storybook and E2E tests)
72-
run: npx playwright install --with-deps
73-
7474
- name: Run storybook tests
7575
run: npm run test-storybook:ci
7676

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
# testing
1414
/coverage
15+
/vitest-test-results
1516

1617
# next.js
1718
/.next/

.husky/commit-msg

Lines changed: 0 additions & 2 deletions
This file was deleted.

.husky/pre-commit

Lines changed: 0 additions & 3 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import nextPlugin from '@next/eslint-plugin-next';
33
import jestDom from 'eslint-plugin-jest-dom';
44
import jsxA11y from 'eslint-plugin-jsx-a11y';
55
import playwright from 'eslint-plugin-playwright';
6-
import testingLibrary from 'eslint-plugin-testing-library';
76

87
export default antfu(
98
{
@@ -46,7 +45,6 @@ export default antfu(
4645
files: [
4746
'**/*.test.ts?(x)',
4847
],
49-
...testingLibrary.configs['flat/react'],
5048
...jestDom.configs['flat/recommended'],
5149
},
5250
// --- E2E Testing Rules ---

lefthook.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Validate commit messages
2+
commit-msg:
3+
commands:
4+
commitlint:
5+
run: npx --no -- commitlint --edit {1}
6+
7+
# Validate content before committing
8+
pre-commit:
9+
commands:
10+
lint:
11+
glob: '*'
12+
run: npx --no -- eslint --fix --no-warn-ignored
13+
stage_fixed: true
14+
priority: 1
15+
check-types:
16+
glob: '*.{ts,tsx}'
17+
run: npm run check-types
18+
priority: 2

lint-staged.config.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)