-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathjest.json
63 lines (52 loc) · 1.9 KB
/
jest.json
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
{
"$schema": "https://json.schemastore.org/eslintrc.json",
"overrides": [
{
"files": ["**/__tests__/**", "*.test.*", "*.spec.*"],
"extends": [
"plugin:jest/all",
"plugin:jest-dom/all",
"plugin:jest-formatting/strict"
],
"env": {
"jest": true
},
"rules": {
"jest/valid-expect": ["error", { "alwaysAwait": true }],
"jest/max-expects": ["error", { "max": 10 }],
"jest/no-restricted-matchers": [
"error",
{
"toMatchSnapshot": "Use more targeted assertions instead of a snapshot",
"toMatchInlineSnapshot": "Use more targeted assertions instead of a snapshot",
"toThrowErrorMatchingSnapshot": "Use more targeted assertions instead of a snapshot",
"toThrowErrorMatchingInlineSnapshot": "Use more targeted assertions instead of a snapshot",
"toBeTruthy": "Use more explicit matchers like `.toBe(true)` or `.toBeGreaterThan(0)`. See https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#avoid-using-tobetruthy-or-tobefalsy",
"toBeFalsy": "Use more explicit matchers like `.toBe(false)`, `.toBe(0)`, or `.toBeUndefined()`. See https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#avoid-using-tobetruthy-or-tobefalsy",
"toBeDefined": "Use a more explicit matcher. See https://docs.gitlab.com/ee/development/testing_guide/frontend_testing.html#tricky-tobedefined-matcher"
}
],
"jest/unbound-method": "off"
}
},
{
"files": ["jest.config.js"],
"parserOptions": {
"sourceType": "script"
},
"rules": {
"unicorn/prefer-module": "off",
"import/no-commonjs": "off"
},
"env": {
"browser": false,
"node": true
}
}
],
"settings": {
"jest": {
"version": 27
}
}
}