File tree 2 files changed +9
-2
lines changed
2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 59
59
run : npm run test:${{ matrix.test-runner }}
60
60
61
61
- name : ▶️ Run type-checks
62
- if : ${{ matrix.node == '20' && matrix.svelte == '4' }}
62
+ if : ${{ matrix.node == '20' && matrix.svelte == '4' && matrix.test-runner == 'vitest:jsdom' }}
63
63
run : npm run types
64
64
65
65
- name : ⬆️ Upload coverage report
Original file line number Diff line number Diff line change 1
- module . exports = {
1
+ import { VERSION as SVELTE_VERSION } from 'svelte/compiler'
2
+
3
+ const IS_SVELTE_5 = SVELTE_VERSION >= '5'
4
+
5
+ export default {
2
6
testMatch : [ '<rootDir>/src/__tests__/**/*.test.js' ] ,
3
7
transform : {
4
8
'^.+\\.svelte$' : 'svelte-jester' ,
@@ -10,6 +14,9 @@ module.exports = {
10
14
injectGlobals : false ,
11
15
moduleNameMapper : {
12
16
'^vitest$' : '<rootDir>/src/__tests__/_jest-vitest-alias.js' ,
17
+ '^@testing-library/svelte$' : IS_SVELTE_5
18
+ ? '<rootDir>/src/svelte5-index.js'
19
+ : '<rootDir>/src/index.js' ,
13
20
} ,
14
21
resetMocks : true ,
15
22
restoreMocks : true ,
You can’t perform that action at this time.
0 commit comments