-
-
Notifications
You must be signed in to change notification settings - Fork 21
Description
What problem does this feature solve?
Currently, test.each and describe.each only accept an array of test cases. They do not support the table syntax (tagged template literal) that both Jest and Vitest provide:
// This syntax is NOT supported in Rstest yet
it.each`
email | name | expected
${'test1@test.com'} | ${'John'} | ${'test1@test.com'}
${'test2@test.com'} | ${'Jane'} | ${'test2@test.com'}
`('test $expected', ({ email, name, expected }) => {
// ...
});This table syntax provides a more readable format for parameterized tests, especially when dealing with multiple parameters. It is widely used in Jest and Vitest test suites, and its absence in Rstest blocks migration from those frameworks.
Referenced from: #85 (comment)
What does the proposed API look like?
Support table syntax for test.each / describe.each.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels