Closed adamyonk closed 7 years ago
Hi @adamyonk, at first sight I'd say you are missing the done
callback parameter.
Could you please try changing:
it('should run the correct actions', () => {
into:
it('should run the correct actions', (done) => {
and replace done => console.log(done)
with simply done
in the parameters of toDispatchActionsWithState
.
Let me know if this helps.
@giuband gah, that was it, thanks!
@giuband thanks for adding the jest matchers!
I was just trying them out and it looks to me like jest matchers are always passing no matter what. This test:
results in
but changing the expected actions array to something bogus like
results in
It seems like the assertions are being run and passing/failing correctly, but the promise isn't being handed back correctly to jest, and it's marking every test as passing.