I'm trying to create a plugin by doing the documentation - https://swc.rs/docs/plugin/ecmascript/getting-started
I have simplified the example. The plugin doesn't change anything.
test!(
Default::default(),
|_| as_folder(TransformVisitor),
boo,
r#"foo === bar;"#,
r#"foo === bar;"#
);
run "cargo test" - Good!
Test to validate jsx:
test!(
Default::default(),
|_| as_folder(TransformVisitor),
boo,
r#"<main></main>"#,
r#"<main></main>"#
);
run "cargo test" - error Expression expected
How do I do a jsx validation test?
Here is a link to the "test" macro documentation. I don't understand what to do https://rustdoc.swc.rs/swc_core/ecma/transforms/testing/macro.test.html