It Should Help

Installation

@artstesh/it-should is a plain TypeScript package with no plugins, transformers, or global setup. Install it as a development dependency:

npm install -D @artstesh/it-should

Requirements

The library has a single peer dependency: TypeScript.

Line

TypeScript peer

Install

v2 (current)

^5.0.2

npm i -D @artstesh/it-should

v1 (legacy)

^4.3.5

npm i -D @artstesh/it-should@1

See Versions for what distinguishes the lines.

Any test runner

The assertions communicate failure by throwing a ShouldError, so they work wherever an exception fails a test — no runner-specific integration is required. Import and use:

// Jest / Jasmine / Mocha / Vitest — identical usage import { should } from '@artstesh/it-should'; it('returns a sorted list', () => { should().array(service.getAll()).ordered({ by: (e) => e?.age }); });

TypeScript compiles the chains as ordinary typed calls: if a check does not exist for the verifier, it is a compile-time error, not a runtime surprise.

What is exported

Everything ships from the package root — should, the verifier classes, Times, and ArrayOrderedSettings:

import { should, Times, ArrayOrderedSettings } from '@artstesh/it-should';

The full list lives in the API reference.

Next steps

02 сентября 2026