Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@guardian/jest-to-be-hint

guardian14MIT0.2.0TypeScript support: included

Jest extension to support custom failure messages

readme

@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.