From abf72c5b375205b1d7d3565c7660ef70e464c45d Mon Sep 17 00:00:00 2001 From: David Sherret Date: Tue, 10 May 2022 16:24:37 -0400 Subject: chore: fix flaky steps_output_within - part 2 (#14562) --- test_util/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test_util/src') diff --git a/test_util/src/lib.rs b/test_util/src/lib.rs index 59a777d40..0eea21b04 100644 --- a/test_util/src/lib.rs +++ b/test_util/src/lib.rs @@ -1819,6 +1819,13 @@ impl<'a> CheckOutputIntegrationTest<'a> { actual = strip_ansi_codes(&actual).to_string(); + // deno test's output capturing flushes with a zero-width space in order to + // synchronize the output pipes. Occassionally this zero width space + // might end up in the output so strip it from the output comparison here. + if args.get(0) == Some(&"test") { + actual = actual.replace('\u{200B}', ""); + } + let expected = if let Some(s) = self.output_str { s.to_owned() } else { -- cgit v1.2.3