How to use the jest-matchers/build/matchers.toEqual function in jest-matchers

To help you get started, we’ve selected a few jest-matchers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jiayihu / rx-polling / test / index.spec.ts View on Github external
function assertDeepEqual(actual, expected) {
  const result = matchers.toEqual(actual, expected);

  if (!result.pass) {
    const diff = diffTestMessages(result.actual, result.expected);
    throw diff + '\n' + result.message();
  }
}