-
Notifications
You must be signed in to change notification settings - Fork 4
/
assertions.json
87 lines (87 loc) · 2.94 KB
/
assertions.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
{
"t.pass()": {
"prefix": "t.pass",
"body": "t.pass(${1:'${2:message}'});",
"description": "Passing assertion"
},
"t.fail()": {
"prefix": "t.fail",
"body": "t.fail(${1:'${2:message}'});",
"description": "Failing assertion"
},
"t.truthy()": {
"prefix": "t.truthy",
"body": "t.truthy(${1:value}${2:, '${3:message}'});",
"description": "Assert that `value` is truthy"
},
"t.falsy()": {
"prefix": "t.falsy",
"body": "t.falsy(${1:value}${2:, '${3:message}'});",
"description": "Assert that `value` is falsy"
},
"t.true()": {
"prefix": "t.true",
"body": "t.true(${1:value}${2:, '${3:message}'});",
"description": "Assert that `value` is `true`"
},
"t.false()": {
"prefix": "t.false",
"body": "t.false(${1:value}${2:, '${3:message}'});",
"description": "Assert that `value` is `false`"
},
"t.is()": {
"prefix": "t.is",
"body": "t.is(${1:value}, ${2:expected}${3:, '${4:message}'});",
"description": "Assert that `value` is equal to `expected`"
},
"t.not()": {
"prefix": "t.not",
"body": "t.not(${1:value}, ${2:expected}${3:, '${4:message}'});",
"description": "Assert that `value` is not equal to `expected`"
},
"t.deepEqual()": {
"prefix": "t.deepEqual",
"body": "t.deepEqual(${1:value}, ${2:expected}${3:, '${4:message}'});",
"description": "Assert that `value` is deep equal to `expected`"
},
"t.notDeepEqual()": {
"prefix": "t.notDeepEqual",
"body": "t.notDeepEqual(${1:value}, ${2:expected}${3:, '${4:message}'});",
"description": "Assert that `value` is not deep equal to `expected`"
},
"t.throws()": {
"prefix": "t.throws",
"body": "t.throws(${1:function}${2:, ${3:expected}${4:, '${5:message}'}});",
"description": "Assert that `function` throws an error"
},
"t.notThrows()": {
"prefix": "t.notThrows",
"body": "t.notThrows(${1:function}${2:, '${3:message}'});",
"description": "Assert that `function` doesn't throw an error"
},
"t.throwsAsync()": {
"prefix": "t.throwsAsync",
"body": "t.throwsAsync(${1:promise|function}${2:, ${3:expected}${4:, '${5:message}'}});",
"description": "Assert that `promise` rejects or `function` returns a promise that rejects"
},
"t.notThrowsAsync()": {
"prefix": "t.notThrowsAsync",
"body": "t.notThrowsAsync(${1:promise|function}${2:, '${3:message}'});",
"description": "Assert that `promise` doesn't reject or `function` returns a promise that doesn't reject"
},
"t.regex()": {
"prefix": "t.regex",
"body": "t.regex(${1:contents}, ${2:regex}${3:, '${4:message}'});",
"description": "Assert that `contents` matches `regex`"
},
"t.notRegex()": {
"prefix": "t.notRegex",
"body": "t.notRegex(${1:contents}, ${2:regex}${3:, '${4:message}'});",
"description": "Assert that contents does not match regex"
},
"t.snapshot()": {
"prefix": "t.snapshot",
"body": "t.snapshot(${1:expected}${2:, '${3:message}'});",
"description": "Assert that `expected` is deeply equal to a previously recorded snapshot, or if necessary, record a new snapshot"
}
}