use std::path::PathBuf; use swc_common::{chain, Mark}; use swc_ecma_parser::{EsConfig, Syntax}; use swc_ecma_transforms_base::resolver; use swc_ecma_transforms_testing::{test_fixture, FixtureTestConfig}; use swc_plugin_add_logging_dataset::add_logging_dataset; fn syntax() -> Syntax { Syntax::Es(EsConfig { jsx: true, ..Default::default() }) } #[testing::fixture("tests/fixture/**/input.js")] fn fixture(input: PathBuf) { let output = input.parent().unwrap().join("output.js"); test_fixture( syntax(), &|_tr| { let unresolved_mark = Mark::new(); let top_level_mark = Mark::new(); chain!( resolver(unresolved_mark, top_level_mark, false), add_logging_dataset(), ) }, &input, &output, FixtureTestConfig { ..Default::default() }, ); }