Skip to content

Commit e846ec3

Browse files
fix: improve jest default configuration (#37)
1 parent 2d3253b commit e846ec3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

configs/jest.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const recommendedConfig = {
1212
"**/{tests,test,__tests__}/**/*.?(c|m)[jt]s?(x)",
1313
"**/?(*.)+(spec|test).[jt]s?(x)",
1414
"**/test-*.[jt]s?(x)",
15+
"setupTest.{js,cjs,mjs,ts,cts,mjs}",
1516
],
1617
ignores: [
1718
"**/{tests,test,__tests__}/**/{helper,helpers,__helper__,__helpers__,fixture,fixtures,__fixture__,__fixtures__}/**/*",
@@ -189,6 +190,12 @@ const recommendedConfig = {
189190

190191
// Disable it for tests, because often you can use `a`, `b`, `c` and etc variables
191192
"id-length": "off",
193+
194+
// In tests, we can have any names
195+
camelcase: "off",
196+
197+
// Doesn't require jsdoc for tests, they are either redundant or we have a separate task for checking types of tests
198+
"jsdoc/require-jsdoc": "off",
192199
},
193200
};
194201

0 commit comments

Comments
 (0)