Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Sep 21, 2023
1 parent e2806f0 commit e3926ff
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/react-remove-properties/transform/tests/fixture.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::path::PathBuf;

use swc_common::{chain, Mark, SyntaxContext};
use react_remove_properties::Options;
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};
Expand All @@ -24,7 +25,13 @@ fn fixture(input: PathBuf) {
chain!(
resolver(unresolved_mark, top_level_mark, false),
react_remove_properties::react_remove_properties(
react_remove_properties::Config::All(true),
if input.to_string_lossy().contains("custom") {
react_remove_properties::Config::WithOptions(Options {
properties: vec!["^data-custom$".into()],
})
} else {
react_remove_properties::Config::All(true)
}
)
)
},
Expand Down

0 comments on commit e3926ff

Please sign in to comment.