It Should Help

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

^5.0.2

2.0.1

v2 (mirrored by master)

1.x

^4.3.5

1.2.1

v1

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.2 TypeScript 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.6should().false(0) correctly passes (0 is falsy).

  • 1.1.5equalUnordered for arrays.

  • 1.1.4equal for arrays, match for strings.

  • 1.1.3uniq for arrays.

  • 1.1.2should().true()/should().false().

  • 1.1.0 — date verifications: before, after, equals with accuracy.

  • 1.0.2 — the contain family: contain, containBy, containExactly, containByExactly, containOnly.

  • 1.0.1map() 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).

02 сентября 2026