-
I guess the test_inline! macro is supposed to compare an inline input with an inline output. However the actual implementation compares an inline input with file content. Given the swc plugin template, there is a test at the bottom of lib.rs test_inline!(
Default::default(),
|_| as_folder(TransformVisitor),
boo,
// Input codes
r#"foo === bar;"#,
// Output codes after transformed with plugin
r#"foo == bar;"#
); The test_line! macro invokes the function swc/crates/swc_ecma_transforms_testing/src/lib.rs Lines 461 to 477 in fd7cf4c then the function read_to_string inside test_inline_input_output takes the output string r#"foo == bar;"# as a file path to read a local file. |
Beta Was this translation helpful? Give feedback.
Answered by
kdy1
Jan 29, 2024
Replies: 1 comment 1 reply
-
It looks like my mistake. I'll fix it soon |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
ptazithos
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like my mistake. I'll fix it soon