-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
Closed
Description
Disclaimer: I'm quite a newbie in the javascript world and especially in vue/vuex.
I believe this page has a mistake in the example:
// check if no mutations should have been dispatched
if (count === 0) {
expect(expectedMutations.length).to.equal(0)
done()
}
}If I understand it correctly this always should fail in case when you have async functions and expectedMutations.length>0 - there is a big chance that count is not updated at the moment of processing if (count === 0) condition.
Probably it should be something like
// check if no mutations should have been dispatched
if (expectedMutations.length === 0) {
expect(count).to.equal(0);
done();
}Metadata
Metadata
Assignees
Labels
No labels