Skip to content

Commit 8842c4d

Browse files
committed
fix(tests): rename test files for consistency and clarity
1 parent 2feb563 commit 8842c4d

File tree

6 files changed

+17
-4
lines changed

6 files changed

+17
-4
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"detect:duplicates": "pnpx jscpd ./src/**/*.ts",
2828
"postinstall": "if [ -d .git ]; then pnpx lefthook install; fi"
2929
},
30+
"type": "module",
3031
"engines": {
3132
"node": ">=22"
3233
},
File renamed without changes.

src/components/atoms/CounterButton/__tests__/CounterButton.test.tsx renamed to src/components/atoms/CounterButton/__tests__/test.tsx

File renamed without changes.

src/components/organisms/ErrorFallback/__tests__/CustomError.tsx renamed to src/components/organisms/ErrorFallback/__tests__/test.tsx

File renamed without changes.
File renamed without changes.

vitest.config.mts

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,32 @@ export default defineConfig({
77
test: {
88
deps: {
99
optimizer: {
10-
web: {
10+
client: {
1111
enabled: true
1212
}
1313
}
1414
},
1515
coverage: {
16-
provider: 'v8'
16+
provider: 'v8',
17+
include: ['**/src/**/*.ts', '**/src/**/*.tsx'],
18+
exclude: [
19+
'**/tests/**',
20+
'**/theme/**',
21+
'**/src/app/error.tsx',
22+
'**/src/app/not-found.tsx',
23+
'**/src/app/global-error.tsx',
24+
'**/src/**/layout.tsx',
25+
'**/src/**/page.tsx',
26+
'**/src/**/loading.tsx',
27+
'**/src/**/types.ts',
28+
'**/src/@types/**',
29+
]
1730
},
1831
environment: 'jsdom',
1932
globals: true,
2033
passWithNoTests: true,
2134
setupFiles: ['./vitest.setup.ts'],
22-
testTransformMode: {web: ['/\.tsx?$/']},
23-
include: ['src/**/*.test.{ts,tsx}'],
35+
include: ['src/**/test.{ts,tsx}'],
2436
exclude: ['**/node_modules/**', '**/playwright/**']
2537
},
2638
resolve: {

0 commit comments

Comments
 (0)