Number Verifier Reference
Created by should().number(entry: number | null | undefined). All checks are chainable and throw ShouldError on failure; every check first asserts the entry is defined (see Concepts).
Methods
Method | Passes when | Failure message (direct) |
|---|---|---|
| strictly equal |
|
|
|
|
|
| — |
|
|
|
|
| — |
|
|
|
|
|
|
|
|
|
|
| — |
Plus the inherited not and defined().
Notes
Negated checks mirror the messages:
${real} is positive, but should not., etc.approximatelyis the float-safe alternative toequals.inRangebounds are exclusive on both sides — for inclusive edges chaingreaterOrEqual(min).lessOrEqual(max).
Guide: Numbers.