@guardian/jest-to-be-hint
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@guardian/jest-to-be-hint

import { toBeHint } from 'jest-to-be-hint';
expect.extend({ toBeHint });

expect('foo').toBeHint('bar', 'bar was not foo');

A Jest extension to support hint text on failure.

The initial motivation is for better error reporting in table-driven tests, but it should be generally useful whenever you have multiple assertions within a single test.

Readme

Keywords

none

Package Sidebar

Install

npm i @guardian/jest-to-be-hint

Weekly Downloads

3

Version

0.2.0

License

MIT

Unpacked Size

152 kB

Total Files

10

Last publish

Collaborators

  • joecowton1
  • guardian-developers
  • akash1810
  • reetta
  • sndrs
  • mxdvl