Skip to content

Commit 6b054b6

Browse files
committed
test(linter/expect-expect): add test case for calling expect as return arg (#12983)
1 parent 5302c8e commit 6b054b6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

crates/oxc_linter/src/rules/jest/expect_expect.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ fn test() {
494494
"#,
495495
None,
496496
),
497-
("it('test', async () => { const array = [1]; for (const element of array) { expect(element).toBe(1); } });", None)
497+
("it('test', async () => { const array = [1]; for (const element of array) { expect(element).toBe(1); } });", None),
498+
(r"it('msg', async () => { const r = foo(); return expect(r).rejects.toThrow(); });", None),
498499
];
499500

500501
let mut fail = vec![

0 commit comments

Comments
 (0)