mnmx

Acceptance examples

Add concrete scenarios and expected results to an acceptance entry.

Usage

TypeScript
import { acceptanceWithExamples } from '@mnmx/engine/stdlib';

const acceptance = {
  'optional-id': acceptanceWithExamples('Match optional route parameters.', [
    { scenario: 'Visit /users', result: 'Match with no id' },
    { scenario: 'Visit /users/42', result: 'Match with id 42' },
  ]),
};

Use the returned string as the value of your acceptance entry. Each example adds a scenario and result to the specification. Passing checks provide the evidence.