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