-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Sorry if the issues are not the correct place to ask a question!
I'd like to assert that an action is causing some other actions to trigger, but not others.
For example, doStuff()
should trigger fooHappened()
but not barDidNot()
Example code that I would like to build:
it('does stuff as expected', async done => {
expect(doStuff())
.toDispatchActions([fooHappened()], done)
.toNotDispatchActions([barDidNot()], done)
})
Two things seem problematic above:
- Chaining the expectations? (I think not)
- Async management: calling
done
two times is probably going to break?
Currently, I'm making two different tests to assert for the same action, one to check what triggers as expected, one to check what is not triggered as expected
Is this the right way to do it?
Thanks for the hints.
Metadata
Metadata
Assignees
Labels
No labels