allure-js
allure-js copied to clipboard
Support Jest table tests
I'm submitting a ...
- [ ] bug report
- [x] feature request
- [ ] support request => Please do not submit support request here, see note at the top of this template.
Jest has a functionality similar to https://github.com/junit-team/junit4/wiki/Parameterized-tests where you can define a number of tests using a table: https://jestjs.io/docs/en/api#testeachtablename-fn-timeout
test.each([
[1, 1, 2],
[1, 2, 3],
[2, 1, 3],
])('.add(%i, %i)', (a, b, expected) => {
expect(a + b).toBe(expected);
});
Currently it will result in 3 tests in Allure report: .add(1,1)
, .add(1,2)
and .add(2,1)
. It would be nice to have some way to group these tests in report.