Skip to content

Commit d59f3bb

Browse files
committed
test(oxlint): match x.ys when replacing var (#12990)
tsgolint is slow, this pr updates the regex to match `1.2s` so the snapshots match https://github.com/oxc-project/oxc/actions/runs/16877756284/job/47806157516
1 parent 42de3d1 commit d59f3bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/oxlint/src/tester.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl Tester {
9999
settings.set_snapshot_suffix("oxlint");
100100

101101
let output_string = &String::from_utf8(output).unwrap();
102-
let regex = Regex::new(r"\d+ms").unwrap();
102+
let regex = Regex::new(r"\d+(?:\.\d+)?s|\d+ms").unwrap();
103103
let output_string = regex.replace_all(output_string, "<variable>ms").into_owned();
104104
let regex = Regex::new(r#""start_time": \d+\.\d+"#).unwrap();
105105
let output_string = regex.replace_all(&output_string, r#""start_time": <variable>"#);

0 commit comments

Comments
 (0)