Trying to understand why deep.equal is still passing when the two objects are very different:
it.only('fetches a footer', () => {
const fetchedAction = { type: FETCH_FOOTER, payload: {} };
mockGet(host, 'footer.json', null, null);
const action = fetchFooter();
expect(action).to.deep.equal(fetchedAction);
});
So here are the values being compared for action vs. fetchedAction:
Notice how for the payload
property they're not the same type of object. Then how come my expect isn't failing if that's the case?
Related (yea I read this but still not sure why simply deep.equal wouldn't fail here): http://ift.tt/2uIw92B
Aucun commentaire:
Enregistrer un commentaire