(key: string)
| 123 | `${normalizeTestNameForKey(testName)} ${count}`; |
| 124 | |
| 125 | export const keyToTestName = (key: string): string => { |
| 126 | if (!/ \d+$/.test(key)) { |
| 127 | throw new Error('Snapshot keys must end with a number.'); |
| 128 | } |
| 129 | const testNameWithoutCount = key.replace(/ \d+$/, ''); |
| 130 | return denormalizeTestNameFromKey(testNameWithoutCount); |
| 131 | }; |
| 132 | |
| 133 | export const getSnapshotData = ( |
| 134 | snapshotPath: string, |
no test coverage detected