Use toEqual for the matchers

This commit is contained in:
Filipa Lacerda 2018-03-29 10:33:44 +01:00
parent 6f0b16e312
commit 7fa7f3e326
No known key found for this signature in database
GPG key ID: 9CA3FDE4D1E2F1C8

View file

@ -12,9 +12,9 @@ export default (action, payload, state, expectedMutations, done) => {
const mutation = expectedMutations[count];
try {
expect(mutation.type).to.equal(type);
expect(mutation.type).toEqual(type);
if (payload) {
expect(mutation.payload).to.deep.equal(payload);
expect(mutation.payload).toEqual(payload);
}
} catch (error) {
done.fail(error);
@ -31,7 +31,7 @@ export default (action, payload, state, expectedMutations, done) => {
// check if no mutations should have been dispatched
if (expectedMutations.length === 0) {
expect(count).to.equal(0);
expect(count).toEqual(0);
done();
}
};