Every diagnostic has a code, a place and usually a hint. Errors stop the suite loading.
Warnings don’t, but most of them mean something won’t be tested or documented.
error[bad-value]: `boiling` isn't a value of the kettle
--> heating.expect:9
| Then the kettle is boiling
= help: the kettle is one of: off, starting, heating, dry
Code Means
syntaxerror A line that isn’t part of the language here: a keyword in the wrong place, or a missing name.
empty-suiteerror The directory has no .expect files.
unknown-steperror A step that’s neither a declared state nor a declared event. The hint suggests the closest.
bad-valueerror A value the state doesn’t have, a number outside its range, or a comparison that doesn’t fit.
bad-stateerror A state declaration that can’t be read, or one declared twice differently.
bad-eventerror An event with no name.
bad-phraseerror A phrase that mixes Givens and Whens, or has no steps.
bad-overrideerror Overrides: names an expectation that doesn’t exist.
duplicateerror Two expectations, terms or other named things with the same name.
two-nameserror / warning A section named twice (error), or the suite named twice (warning).
no-thenerror An expectation with no Then.
contradictionerror Steps in one condition that can’t hold together (“off” and “heating”).
misplaced-eventerror An event in a Given or a Then. Events only happen in a When.
misplaced-shifterror A relative step (“goes up by 1”) anywhere but an expectation’s Then.
two-eventserror One action with two events. Put a Then between them, or split the step.
empty-storyerror A story or scenario with no steps.
maybe-stepwarning Description text that looks like a misspelled step (“Gvien the kettle is off”).
says-nothingwarning A step that’s true of every value (“off or heating” of a state with only those).
shows-whatwarning A Shows: line that doesn’t say which value it’s for.
Code Means
unknown-platformerror A tag or On: naming a platform that isn’t declared, or any platform in a suite that declares none.
default-platformerror A tag for the default platform. Write its lines plainly.
Code Means
conflicterror Two expectations can both apply and promise contradicting things. The note names where they overlap; the hint suggests which is the exception.
override-cycleerror Overrides that go round in a circle.
unneeded-overridewarning An override between two expectations that never disagree.
unreachablewarning No chain of expectations gets the system into this expectation’s Given, so nothing can test it.
no-way-inwarning Nothing leads from a section’s parent into the section, so the docs can’t say how to get there.
Code Means
unclear-steperror The step might set off an expectation, and the story doesn’t pin down whether.
unspecifiederror An event happens and no expectation says what it does.
contradictserror A Then in the story contradicts what the expectations say.
clasherror Two expectations fire at this step and disagree. Settle the conflict first.
unpromisedwarning A Then in the story that no expectation promises. It’s checked anyway.
untestedwarning No story exercises this expectation. The hint is a story that would.