Quick Start
Three minutes, five chains: numbers, strings, arrays with ordering, dates, and objects. Every snippet assumes import { should } from '@artstesh/it-should';.
1. A number check
Bounds in inRange are exclusive; chainable checks let one line assert several properties.
2. A string check with occurrence counting
Times helpers (once, twice, exactly(n), moreThan(n), lessThan(n)) turn "contains" into "contains exactly N times". See Strings.
3. The flagship: array ordering
On failure the test throws Elements aren't ordered. — the check that motivated the library. Full settings in Array Ordering.
4. A date check with accuracy
Dates accept Date instances or ISO strings everywhere; the optional accuracy ('year'… 'millisecond') truncates both sides before comparing. See Dates.
5. Object comparison with a rule
rule/map/ignoring/compareOnly shape the comparison; equal() runs it. See Objects.
Negation and definedness
Any chain can flip meaning with not and guard the entry with defined():
The exact null/undefined rules matter — read Concepts before relying on not with nullable entries.
Next steps
Concepts — the model behind the chains.
Cookbook — recipes for real test scenarios.
API reference — every signature.