How to use the snapshot-diff function in snapshot-diff

To help you get started, we’ve selected a few snapshot-diff 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 kentcdodds / glamorous-with-next / components / __tests__ / toggle-button.js View on Github external
test('has different styles when on: true', () => {
  expect(
    snapshotDiff(serialize(), serialize())
  ).toMatchSnapshot()
})
github MatejBransky / react-katex / index.spec.js View on Github external
test('props updated', () => {
    const $ = render(\sum_0^\infty);
    const $first = $.container.cloneNode(true);
    let $second;

    $.rerender(\sum_1^\infty);
    $second = $.container.cloneNode(true);

    expect(snapshotDiff($first, $second)).toMatchSnapshot();
  });

snapshot-diff

Diffing Jest snapshots utility

MIT
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages