-
Notifications
You must be signed in to change notification settings - Fork 12
/
jest.js
40 lines (40 loc) · 1.19 KB
/
jest.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const base = require("./base.js");
module.exports = {
...base,
plugins: [...base.plugins],
overrides: [
{
files: ["**/__tests__/*.ts"],
extends: ["plugin:jest/recommended", "plugin:jest/style"],
plugins: ["jest"],
rules: {
"jest/consistent-test-it": "error",
"jest/no-conditional-in-test": "error",
"jest/no-duplicate-hooks": "error",
"jest/no-test-return-statement": "error",
"jest/prefer-comparison-matcher": "error",
"jest/prefer-each": "error",
"jest/prefer-equality-matcher": "error",
"jest/prefer-expect-assertions": [
"warn",
{
onlyFunctionsWithAsyncKeyword: true,
onlyFunctionsWithExpectInCallback: true,
onlyFunctionsWithExpectInLoop: true,
},
],
"jest/prefer-expect-resolves": "error",
"jest/prefer-lowercase-title": [
"error",
{
ignoreTopLevelDescribe: true,
},
],
"jest/prefer-mock-promise-shorthand": "error",
"jest/prefer-spy-on": "error",
"jest/prefer-todo": "error",
"jest/require-top-level-describe": "error",
},
},
],
};