Skip to content

Search results show highlights

story.and() after a Then, written explicitly rather than left to auto-conversion.

import { story } from 'executable-stories-vitest';
import { it } from 'vitest';
it("Search results show highlights", ({ task }) => {
story.init(task);
story.given('the search index contains "hello world"');
story.when('the user searches for "hello"');
story.then('results should include "hello world"');
story.and("the matching text should be highlighted");
});
### ✅ Search results show highlights
- **Given** the search index contains "hello world"
- **When** the user searches for "hello"
- **Then** results should include "hello world"
- **And** the matching text should be highlighted