Versions
@artstesh/it-should is published in two major lines maintained in parallel. The major version encodes the TypeScript generation the line targets; this documentation describes the v2 line.
Line | TypeScript peer | Latest | Branch |
|---|---|---|---|
2.x |
| 2.0.1 |
|
1.x |
| 1.2.1 |
|
Features and fixes flow from v2 to v1 by porting — behavior described here applies to both lines unless a difference is called out. When TypeScript ^6 support lands on the v2 line, the peer range widens and this page is the place to check.
Changelog
2.0.x — the TypeScript 5 line
2.0.0 — the
^5.0.2TypeScript peer line;should().objects()and the internal object manager are constrained to object types ({}) for stricter typing of the two compared sides.2.0.1 — maintenance release.
1.x — the TypeScript 4 line
1.2.0 / 1.2.1 — internal groundwork for method verification (not yet part of the public API); maintenance fixes.
1.1.6 —
should().false(0)correctly passes (0 is falsy).1.1.5 —
equalUnorderedfor arrays.1.1.4 —
equalfor arrays,matchfor strings.1.1.3 —
uniqfor arrays.1.1.2 —
should().true()/should().false().1.1.0 — date verifications:
before,after,equalswith accuracy.1.0.2 — the
containfamily:contain,containBy,containExactly,containByExactly,containOnly.1.0.1 —
map()for object comparison; initial public line.
Upgrading 1.x → 2.x
For consumers the API surface is the same chains; the difference is the TypeScript peer and stricter generics on objects() — code comparing non-object values (primitives) through should().objects(...) no longer compiles, by design. Install the line matching your TypeScript version (see Installation).