Skip to content

Commit 872a47b

Browse files
authoredFeb 2, 2024
test(es/testing): Ensure that test_inline! is working properly (#8590)
**Related issue:** - Closes #8586
1 parent 8c1f108 commit 872a47b

File tree

1 file changed

+8
-2
lines changed
  • crates/swc_ecma_transforms_testing/src

1 file changed

+8
-2
lines changed
 

‎crates/swc_ecma_transforms_testing/src/lib.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -478,19 +478,25 @@ test_inline!(
478478
ignore,
479479
Syntax::default(),
480480
|_| noop(),
481-
noop_ignored,
481+
test_inline_ignored,
482482
"class Foo {}",
483483
"class Foo {}"
484484
);
485485

486486
test_inline!(
487487
Syntax::default(),
488488
|_| noop(),
489-
noop_test,
489+
test_inline_pass,
490490
"class Foo {}",
491491
"class Foo {}"
492492
);
493493

494+
#[test]
495+
#[should_panic]
496+
fn test_inline_should_fail() {
497+
test_inline_input_output(Default::default(), |_| noop(), "class Foo {}", "");
498+
}
499+
494500
#[macro_export]
495501
macro_rules! test {
496502
(ignore, $syntax:expr, $tr:expr, $test_name:ident, $input:expr) => {

0 commit comments

Comments
 (0)
Please sign in to comment.