avajs/ava
Voir sur GitHubSupport running a test function multiple times with different data
Open
#2 980 ouverte le 26 févr. 2022
enhancementhelp wantedscope:test-interface
Métriques du dépôt
- Stars
- (20 600 stars)
- Métriques de merge PR
- (Aucune PR mergée en 30 j)
Description
You can already do this with macros, but it's a bit verbose and complicated. It would be nice to simplify the common case of just running the same test over an array of fixtures.
Possible API:
test('validate email', t => {
console.log(t.data);
t.true(isString(t.data));
})
.data([
'foo',
'bar'
]);
//=> 'foo'
//=> 'bar'