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

When doing data-driven testing, put function name into test title #42

Closed bahmutov closed 7 years ago

bahmutov commented 7 years ago

Otherwise this gets confused

it('works', () => {
 snapshot(add, ...)
})
it('works', () => {
 snapshot(sub, ...)
})

because both simply try to save 'works' snapshot. Should form snapshot name as "function name - spec name"