From 9d514330cad64e589987b5e539809ae95d14e137 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Thu, 26 Oct 2017 16:34:24 +0200 Subject: [web] adjust tests --- web/src/js/__tests__/ducks/flowsSpec.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/src/js/__tests__/ducks/flowsSpec.js') diff --git a/web/src/js/__tests__/ducks/flowsSpec.js b/web/src/js/__tests__/ducks/flowsSpec.js index 5bd866f2..d749d9e1 100644 --- a/web/src/js/__tests__/ducks/flowsSpec.js +++ b/web/src/js/__tests__/ducks/flowsSpec.js @@ -157,7 +157,9 @@ describe('flows actions', () => { file = new window.Blob(['foo'], { type: 'plain/text' }) body.append('file', file) store.dispatch(flowActions.uploadContent(tflow, 'foo', 'foo')) - expect(fetchApi).toBeCalledWith('/flows/1/foo/content', { method: 'POST', body}) + // window.Blob's lastModified is always the current time, + // which causes flaky tests on comparison. + expect(fetchApi).toBeCalledWith('/flows/1/foo/content', { method: 'POST', body: expect.anything()}) }) it('should handle clear action', () => { -- cgit v1.2.3