Create users from table input (Vitest)
Generated output
Section titled “Generated output”Example: Create users from table input: [email protected]
### ✅ Create users from table input: [email protected]
- **Given** the admin is on the create user page- **When** the admin submits the following user details **Details** | email | role | | --- | --- | | [email protected] | user |Vitest code
Section titled “Vitest code”const createUserExamples = [];for (const row of createUserExamples) { it(`Create users from table input: ${row.email}`, ({ task }) => { story.init(task); story.given("the admin is on the create user page"); story.when("the admin submits the following user details"); story.table({ label: "Details", columns: ["email", "role"], rows: [[row.email, row.role]], }); story.then(`the user "${row.email}" should exist with role "${row.role}"`); });}