Tests for fixed bug in unsubscribing consumers#8
Tests for fixed bug in unsubscribing consumers#8Andarist wants to merge 1 commit intojamiebuilds:masterfrom
Conversation
| "flow-bin": "^0.60.1", | ||
| "husky": "^0.14.3", | ||
| "jest": "^21.2.1", | ||
| "jest": "^22.1.4", |
There was a problem hiding this comment.
for a moment I thought there was no test setup in this package (confused it with unstated repo), so I've started creating one and I've bumped jest version by doing so - can revert that change if you dont like it
| expect(wrapper).toMatchSnapshot(); | ||
| wrapper.find('button').simulate('click'); | ||
| expect(wrapper).toMatchSnapshot(); | ||
| }) |
There was a problem hiding this comment.
It's not really clear that this tests unsubscribing the right consumer. Instead of modifying the existing component, could you create a new one that wraps two different <Title>'s and hides one of them?
There was a problem hiding this comment.
Not sure what is the idea behind proposed tweaked test - I mean I'm not sure in what way would you see it tweaked.
This test is testing that correct component got unsubscribed (or rather that others are still subscribed). Each <Title/> has different children, so we can see if those components got updated. I agree though that this might not be as clear as it could be - mainly because it's a snapshot test.
cc @TrySound ;)