Skip to content

Commit 5dcec8b

Browse files
gajusnovemberborn
authored andcommitted
Ensure use-t-well supports throwsAsync/ notThrowsAsync assertions
1 parent 1785f9b commit 5dcec8b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/use-t-well.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ ruleTester.run('use-t-well', rule, {
4242
testCase('t.notDeepEqual(v, v);'),
4343
testCase('t.throws(fn);'),
4444
testCase('t.notThrows(fn);'),
45+
testCase('t.throwsAsync(fn);'),
46+
testCase('t.notThrowsAsync(fn);'),
4547
testCase('t.regex(v, /v/);'),
4648
testCase('t.notRegex(v, /v/);'),
4749
testCase('t.snapshot(v);'),

util.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,14 @@ const assertionMethodsNumArguments = new Map([
168168
['is', 2],
169169
['not', 2],
170170
['notDeepEqual', 2],
171+
['notRegex', 2],
171172
['notThrows', 1],
173+
['notThrowsAsync', 1],
172174
['pass', 0],
173175
['regex', 2],
174-
['notRegex', 2],
175176
['snapshot', 1],
176177
['throws', 1],
178+
['throwsAsync', 1],
177179
['true', 1],
178180
['truthy', 1]
179181
]);

0 commit comments

Comments
 (0)