How to use the jest-snapshot.toMatchSnapshot function in jest-snapshot

To help you get started, we’ve selected a few jest-snapshot 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 tivac / modular-css / packages / test-utils / expect / toMatchDiffSnapshot.js View on Github external
toMatchDiffSnapshot(
        valueA,
        valueB,
        options = {},
        testName
      ) {
        const difference = snapshotDiff(valueA, valueB, { ...defaults, ...options });
      
        return snapshot.toMatchSnapshot.call(this, difference, testName);
      },
});
github jest-community / snapshot-diff / src / index.js View on Github external
function toMatchDiffSnapshot(
  valueA: any,
  valueB: any,
  options?: Options,
  testName?: string
) {
  const difference = snapshotDiff(valueA, valueB, options);

  return snapshot.toMatchSnapshot.call(this, difference, testName);
}