Jest Equality Matcher For Strings That Disregards Whitespace

Posted by Andre Scott | Updated on

Here is one that compresses all whitespace down to a single space for readability based on Jest’s toEqual matcher. It will deal with tabs, newlines etc. It will give you pretty output like the included Jest matchers.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers