Skip to content
This repository was archived by the owner on Aug 8, 2020. It is now read-only.

Commit 48fc08d

Browse files
committed
Update snippets for latest AVA
1 parent 3057244 commit 48fc08d

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

snippets/assertions.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,19 @@
4242
},
4343
"t.throws()": {
4444
"prefix": "t.throws",
45-
"body": "t.throws(${1:function|promise}${2:, ${3:expected}${4:, '${5:message}'}});"
45+
"body": "t.throws(${1:function}${2:, ${3:expected}${4:, '${5:message}'}});"
4646
},
4747
"t.notThrows()": {
4848
"prefix": "t.notThrows",
49-
"body": "t.notThrows(${1:function|promise}${2:, '${3:message}'});"
49+
"body": "t.notThrows(${1:function}${2:, '${3:message}'});"
50+
},
51+
"t.throwsAsync()": {
52+
"prefix": "t.throwsAsync",
53+
"body": "t.throwsAsync(${1:promise|function}${2:, ${3:expected}${4:, '${5:message}'}});"
54+
},
55+
"t.notThrowsAsync()": {
56+
"prefix": "t.notThrowsAsync",
57+
"body": "t.notThrowsAsync(${1:promise|function}${2:, '${3:message}'});"
5058
},
5159
"t.regex()": {
5260
"prefix": "t.regex",
@@ -56,9 +64,9 @@
5664
"prefix": "t.notRegex",
5765
"body": "t.notRegex(${1:contents}, ${2:regex}${3:, '${4:message}'});"
5866
},
59-
"t.ifError()": {
60-
"prefix": "t.ifError",
61-
"body": "t.ifError(${1:error}${2:, '${3:message}'});"
67+
"t.snapshot()": {
68+
"prefix": "t.snapshot",
69+
"body": "t.snapshot(${1:expected}${2:, '${3:message}'});"
6270
}
6371
}
6472
}

snippets/ava.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"prefix": "test-serial",
2121
"body": "test.serial('${1:title}', t => {\n\t$2\n});"
2222
},
23-
"Test - Cb": {
23+
"Test - Callback": {
2424
"prefix": "test-cb",
2525
"body": "test.cb('${1:title}', t => {\n\t$2\n\tt.end()\n});"
2626
},

0 commit comments

Comments
 (0)