Skip to content

Commit 76e7423

Browse files
authored
fix: allow the use of vitest functions outside of hooks (#52)
* fix: allow the use of vitest functions outside of hooks * allow describe * allow test * fix formatting
1 parent f14ce33 commit 76e7423

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

jest.js

+16
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@ const eslintConfig = {
2020
'jest/prefer-lowercase-title': ['error', { ignore: ['describe'] }],
2121
'jest/no-hooks': 'off',
2222
'jest/prefer-snapshot-hint': 'off',
23+
'jest/require-hook': [
24+
'error',
25+
{
26+
// allow the use of vitest functions
27+
allowedFunctionCalls: [
28+
'beforeAll',
29+
'afterAll',
30+
'beforeEach',
31+
'afterEach',
32+
'describe',
33+
'it',
34+
'test',
35+
'vi.mock',
36+
],
37+
},
38+
],
2339
},
2440
},
2541
],

0 commit comments

Comments
 (0)