How to use the jest-snapshot.utils.testNameToKey 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 jest-community / jest-editor-support / src / Snapshot.js View on Github external
const buildName: (snapshotNode: Node, parents: Array, position: number) => string = (
  snapshotNode,
  parents,
  position
) => {
  const fullName = parents.map(parent => parent.arguments[0].value).join(' ');

  return utils.testNameToKey(fullName, position);
};