Skip to content

Commit 8ad76b4

Browse files
committed
test(linter/expect-expect): add test case for calling expect as return arg
1 parent d7cca12 commit 8ad76b4

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)