Function assertSnapshot

  • Assert that the given snapshot data matches already-saved snapshot file's expectations. Note that the given data will be serialized into a JSON string if it is not already a string. This works in both Node and web tests.

    Web tests require a web-test-runner config with the snapshotPlugin plugin from @virmator/test/dist/web-snapshot-plugin/web-snapshot-plugin.js in order to work.

    Parameters

    Returns Promise<void>