File tree Expand file tree Collapse file tree 4 files changed +26
-27
lines changed Expand file tree Collapse file tree 4 files changed +26
-27
lines changed Original file line number Diff line number Diff line change @@ -83,28 +83,28 @@ jobs:
83
83
- name : Check TypeScript 👷♂️
84
84
run : npm run check-ts
85
85
86
- # test:
87
- # name: Run Tests
88
- # needs: [install]
89
- # runs-on: ubuntu-latest
90
- # steps:
91
- # - name: Checkout ✅
92
- # uses: actions/checkout@v4
93
- # - name: Setup Node 🤖
94
- # uses: actions/setup-node@v4
95
- # with:
96
- # node-version: ${{ env.node_version }}
97
- # cache: npm
98
- # - name: Restore cache 🔮
99
- # id: cache
100
- # uses: actions/cache/restore@v4
101
- # with:
102
- # path: ./node_modules
103
- # key: ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}
104
- # - name: Run Tests 🚦
105
- # run: npm run test
106
- # - name: Run Benchmark
107
- # run: npm run bench
86
+ test :
87
+ name : Run Tests
88
+ needs : [install]
89
+ runs-on : ubuntu-latest
90
+ steps :
91
+ - name : Checkout ✅
92
+ uses : actions/checkout@v4
93
+ - name : Setup Node 🤖
94
+ uses : actions/setup-node@v4
95
+ with :
96
+ node-version : ${{ env.node_version }}
97
+ cache : npm
98
+ - name : Restore cache 🔮
99
+ id : cache
100
+ uses : actions/cache/restore@v4
101
+ with :
102
+ path : ./node_modules
103
+ key : ${{ runner.os }}-modules-${{ hashFiles('package-lock.json') }}
104
+ - name : Run Tests 🚦
105
+ run : npm run test
106
+ # - name: Run Benchmark
107
+ # run: npm run bench
108
108
109
109
build :
110
110
name : Build site
Original file line number Diff line number Diff line change 28
28
"lint-all" : " npm run check-ts && npm run eslint && npm run format && npm run knip" ,
29
29
"lint-all-fix" : " npm run eslint-fix && npm run format-fix" ,
30
30
"prepare" : " git config core.hooksPath .git-hooks" ,
31
- "pre-commit" : " npm run lint-all"
31
+ "pre-commit" : " npm run lint-all && npm test "
32
32
},
33
33
"dependencies" : {
34
34
"@emotion/react" : " ^11.13.3" ,
Original file line number Diff line number Diff line change @@ -19,7 +19,8 @@ import {
19
19
import { useGetWordProgressList } from '@/services/wordProgress/hooks' ;
20
20
import { useGetTagList } from '@/services/tags/hooks' ;
21
21
import { renderTags } from '@/services/tags/utils' ;
22
- import { useEffectOnce } from '@/hooks/useOnceEffect' ;
22
+ import { useEffectOnce } from '@/hooks/useEffectOnce' ;
23
+ import { useEffectNext } from '@/hooks/useEffectNext' ;
23
24
24
25
export const useWordToTranslation = ( ) => {
25
26
const { data : tagList , isLoading : isLoadingTags } = useGetTagList ( ) ;
@@ -112,10 +113,9 @@ export const useWordToTranslation = () => {
112
113
} ) ;
113
114
114
115
// Update items after changed word list
115
- useEffectOnce ( {
116
+ useEffectNext ( {
116
117
effect : ( ) => setItems ( ( state ) => updateQuizItems ( state , wordList ! ) ) ,
117
118
condition : ( ) => ! ! wordList ,
118
- skipFirst : true ,
119
119
deps : [ wordList ] ,
120
120
} ) ;
121
121
Original file line number Diff line number Diff line change @@ -6,7 +6,6 @@ import { Settings } from 'luxon';
6
6
import { afterAll , afterEach , beforeAll , vi } from 'vitest' ;
7
7
import { setupMatchers } from './test-utils/matchers' ;
8
8
import { server } from './test-utils/msw/server' ;
9
- import './i18n' ;
10
9
11
10
setupMatchers ( ) ;
12
11
You can’t perform that action at this time.
0 commit comments