I'm working with my jasmine test suite, and I'm getting a weird error that causes the test to fail. The code works, and I've verified by debugging the tests that the values I expect are the values present, but the test fails. I get this as output:
Failed
at stack (/Users/username/code/source/client/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2200:17)
at buildExpectationResult (/Users/username/code/source/client/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:2170:14)
at Spec.expectationResultFactory (/Users/username/code/source/client/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:777:18)
at Spec.addExpectationResult (/Users/username/code/source/client/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:450:34)
at Env.fail (/Users/username/code/source/client/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:1192:25)
at next.fail (/Users/username/code/source/client/node_modules/jasmine-core/lib/jasmine-core/jasmine.js:4046:19)
This is what my tests look like
describe('the returned type', () => {
afterEach(store.clearActions);
beforeEach(done => {
mock.onPatch(url).replyOnce(200, { updated_at: moment().toISOString() });
save(4, value)(store.dispatch, store.getState)
.then(() => setTimeout(done, 750));
});
it('should have correct type', () => {
debugger;
const action = store.getActions()[0];
expect(action.type).toEqual(LAST_SAVED_UPDATE);
});
});
Aucun commentaire:
Enregistrer un commentaire