expect icon indicating copy to clipboard operation
expect copied to clipboard

Write better assertions

Results 11 expect issues
Sort by recently updated
recently updated
newest added

```js expect(() => foo()).toNotThrow ``` fails when `foo` throws, but it doesn't tell me what error `foo` threw. This would be really useful for debugging. I'm happy to make a...

enhancement
help wanted

I was glad to see that expect works with custom messages, but had to look at the code to see exactly how and when they are fired, and how I...

First, great project! I'm sure you saw my tweet of praise: > https://twitter.com/ericclemmons/status/681615901343399936 ### `toHaveBeenCalledWith` Anyway, having replaced `sinon` with this, I've noticed that this very readable call... ``` js...

Example: ``` js it('toInclude should work for Maps', () => { const obj = { a: 'a', b: 'b', c: 'c' }; const map = new Map(); Object.keys(obj).forEach(k => {...

enhancement
question
help wanted

```js > expect(Object.create(null)).toEqual({}) Error: Expected {} to equal {} ``` They are different, because of prototype, but the output is weird.

enhancement
help wanted

I'm getting what appears to be a bogus error: ``` Expected { app: { data: {}, ui: { fetchinUser: false, fetchingInstruments: false, fetchingLoans: false, modalOpen: false, modalView: null, selectedTab: 0,...

enhancement
help wanted

The meaning of `spy.reset` is ambiguous (see discussion in #138). What exactly does it reset? The call count? The return/thrown values? My vote is to either remove it or make...

semver-major: breaking change

I'm trying out migrating from `mocha` & `expect` to just `jest`. The code mods handled most of the cases, but there are some MAJOR differences in how Jest's `isEqual` matcher...

documentation
help wanted

Is there a way to do something like this: ``` javascript expect(mySpy).toHaveBeenCalledWith('foo', 'bar', anythingOfType(Function)); ``` Seems like we would have to modify the `isEqual` test helper.

Hey, thanks for this great library. I just came across `.toExcludeKeys`. And for me it feels that something is wrong here. The docs say: > does not contain **any** of...