aboutsummaryrefslogtreecommitdiffstats
path: root/web/src/js/__tests__/ducks/flowsSpec.js
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2017-10-26 16:34:24 +0200
committerMaximilian Hils <git@maximilianhils.com>2017-10-26 16:34:24 +0200
commit9d514330cad64e589987b5e539809ae95d14e137 (patch)
tree36a9f99eac2f97adec453356b22e716c24a13d72 /web/src/js/__tests__/ducks/flowsSpec.js
parentc2401e35f4483e68116b8e90bb58b70659ace682 (diff)
downloadmitmproxy-9d514330cad64e589987b5e539809ae95d14e137.tar.gz
mitmproxy-9d514330cad64e589987b5e539809ae95d14e137.tar.bz2
mitmproxy-9d514330cad64e589987b5e539809ae95d14e137.zip
[web] adjust tests
Diffstat (limited to 'web/src/js/__tests__/ducks/flowsSpec.js')
-rw-r--r--web/src/js/__tests__/ducks/flowsSpec.js4
1 files changed, 3 insertions, 1 deletions
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', () => {