Skip to content

Eligible customer gets discount

The positive path of a business rule, with the rule named in the scenario title.

import { story } from 'executable-stories-vitest';
import { describe, it } from 'vitest';
describe("Feature: Discounts", () => {
describe("Rule: Discounts apply only to eligible customers", () => {
it("Eligible customer gets discount", ({ task }) => {
story.init(task);
story.given("the customer is eligible for discounts");
story.when("the customer checks out");
story.then("a discount should be applied");
});
});
});
### ✅ Eligible customer gets discount
- **Given** the customer is eligible for discounts
- **When** the customer checks out
- **Then** a discount should be applied