mirror of
https://github.com/danbulant/oxc
synced 2026-05-25 04:42:10 +00:00
The `--override` flag used to write the output which is generated by the transformer to the `overrides` folder according to the test path. The acting is similar to the previous `takeover` mode
23 lines
697 B
Rust
23 lines
697 B
Rust
use oxc_transform_conformance::{TestRunner, TestRunnerOptions};
|
|
use pico_args::Arguments;
|
|
|
|
fn main() {
|
|
let mut args = Arguments::from_env();
|
|
|
|
let options = TestRunnerOptions {
|
|
debug: args.contains("--debug"),
|
|
filter: args.opt_value_from_str("--filter").unwrap(),
|
|
r#override: args.contains("--override"),
|
|
exec: args.contains("--exec"),
|
|
};
|
|
|
|
if options.r#override {
|
|
debug_assert!(
|
|
options.filter.is_some(),
|
|
"Cannot use `--override` without a specific `--filter`, because there's no
|
|
doubt about it you do not want to override all Babel's tests"
|
|
);
|
|
}
|
|
|
|
TestRunner::new(options.clone()).run();
|
|
}
|