toEqualIgnoringWhitespace

Bun

Symbol

Matchers.toEqualIgnoringWhitespace

toEqualIgnoringWhitespace(expected: string): void

Asserts that a value is equal to the expected string, ignoring any whitespace.

@param expected

the expected string

expect(" foo ").toEqualIgnoringWhitespace("foo");
expect("bar").toEqualIgnoringWhitespace(" bar ");