Bulk user creation (Vitest)
Generated output
Section titled “Generated output”### ✅ Bulk user creation
- **Given** the following users exist **Users** | email | role | status | | ----------------- | ----- | ------ | | [email protected] | admin | active | | [email protected] | user | active | | [email protected] | user | locked |- **When** the admin opens the user list- **Then** the user list should include **Expected** | email | role | status | | ----------------- | ----- | ------ | | [email protected] | admin | active | | [email protected] | user | active | | [email protected] | user | locked |Vitest code
Section titled “Vitest code”import { story } from 'executable-stories-vitest';import { describe, it } from 'vitest';
describe('Users', () => { it('Bulk user creation', ({ task }) => { story.init(task); story.given('the following users exist'); story.table({ label: 'Users', columns: ['email', 'role', 'status'], rows: [ ], }); story.when('the admin opens the user list'); story.then('the user list should include'); story.table({ label: 'Expected', columns: ['email', 'role', 'status'], rows: [ ], }); });});From apps/vitest-example/src/replicate.story.test.ts.