describe, test, it, lifecycle hooks and expect(...) matchers. It works for Bun’s test runner, Jest and Vitest, since they share these names. Tests read as a list of named checks, which makes them a useful summary of what code is supposed to do.
Examples
Groups, hooks and checks
English
Negated and argument-less matchers
English
What it covers
- Blocks:
describe,test,it,beforeAll,beforeEach,afterAll,afterEach. - Matchers:
toBe,toEqual,toStrictEqual,toMatchObject,toBeDefined,toBeUndefined,toBeNull,toBeTruthy,toBeFalsy,toHaveLength,toContain,toThrow, the four numeric comparisons,toBeCloseTo,toHavePropertyandtoBeInstanceOf. Any.notflips the check. - Other matchers read as “check that X matches Y” using the matcher’s name.
Translating
The English phrasebook is exported astestingEn and typed as TestingPhrases.