From d59f3bbf40bc70a36a121607ca4654c103311cb9 Mon Sep 17 00:00:00 2001 From: camc314 <18101008+camc314@users.noreply.github.com> Date: Mon, 11 Aug 2025 14:31:25 +0000 Subject: [PATCH] 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 --- apps/oxlint/src/tester.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/oxlint/src/tester.rs b/apps/oxlint/src/tester.rs index eeee8377ed3a4..6f7c6b509a31b 100644 --- a/apps/oxlint/src/tester.rs +++ b/apps/oxlint/src/tester.rs @@ -99,7 +99,7 @@ impl Tester { settings.set_snapshot_suffix("oxlint"); let output_string = &String::from_utf8(output).unwrap(); - let regex = Regex::new(r"\d+ms").unwrap(); + let regex = Regex::new(r"\d+(?:\.\d+)?s|\d+ms").unwrap(); let output_string = regex.replace_all(output_string, "ms").into_owned(); let regex = Regex::new(r#""start_time": \d+\.\d+"#).unwrap(); let output_string = regex.replace_all(&output_string, r#""start_time": "#);