How to use the jest-snapshot.initializeSnapshotState 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 storybookjs / storybook / src / test_runner / snapshot_runner.js View on Github external
startKind(kind) {
    const filePath = path.resolve(this.configDir, kind);
    this.state = initializeSnapshotState(filePath, this.update);
    this.kind = kind;
    const { updated, added, matched, unmatched } = this.state;
    this.testOutcomes = { updated, added, matched, unmatched };
  }