bahmutov / snap-shot

Jest-like snapshot feature for the rest of us, works magically by finding the right caller function
169 stars 3 forks source link

Add utility to handle multiple names where the name cannot be determined #13

Closed bahmutov closed 7 years ago

bahmutov commented 7 years ago

In these tests the hash of the test will be the same and we will think they are the same

const names = ['foo', 'bar']
names.forEach(name => {
  it(name, () => {
    snapshot(name)
  })
})

it might be simple if it thinks it is same test, just different snapshots equivalent to

const names = ['foo', 'bar']
it(function () => {
  snapshot('foo')
  snapshot('bar')
})

multiple snapshots work in #1

bahmutov commented 7 years ago

done