0.2.0 • Published 4 years ago

@guardian/jest-to-be-hint v0.2.0

Weekly downloads
24
License
MIT
Repository
github
Last release
4 years ago

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