Skip to content

Fix calling `calledWith` with `null`

Compare
Choose a tag to compare
@timkindberg timkindberg released this 03 May 14:12
· 47 commits to master since this release

This should work again now:

const fn = jest.fn();
when(fn).calledWith(null).mockReturnValue('yay!');
expect(fn(null)).toBe('yay!');