Removed then clauses, no need to test the test within the test

This commit is contained in:
Hugo Häggmark 2019-01-31 07:48:33 +01:00
parent 6a84a85a80
commit 99b500c740

View File

@ -39,8 +39,7 @@ describe('reducerTester', () => {
expect(() => { expect(() => {
reducerTester() reducerTester()
.givenReducer(mutatingReducer, initialState) .givenReducer(mutatingReducer, initialState)
.whenActionIsDispatched(dummyAction('some string')) .whenActionIsDispatched(dummyAction('some string'));
.thenStateShouldEqual({ ...initialState, data: ['some string'] });
}).toThrow(); }).toThrow();
}); });
}); });
@ -50,8 +49,7 @@ describe('reducerTester', () => {
expect(() => { expect(() => {
reducerTester() reducerTester()
.givenReducer(okReducer, initialState) .givenReducer(okReducer, initialState)
.whenActionIsDispatched(dummyAction('some string')) .whenActionIsDispatched(dummyAction('some string'));
.thenStateShouldEqual({ ...initialState, data: ['some string'] });
}).not.toThrow(); }).not.toThrow();
}); });
}); });