diff options
author | Maximilian Hils <git@maximilianhils.com> | 2017-05-18 13:05:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-18 13:05:15 +0200 |
commit | a9e002af18b82a6f476507a9ff03eebcc19f867c (patch) | |
tree | 943790e81a810d4fd2fb4fc185109aff0049823b /web/src/js/__tests__/ducks/tutils.js | |
parent | 4b1cd76f3ea1255620ae8db3eb8ba3bb33840166 (diff) | |
parent | 4e4be8bd6854f8e5364049fa30e51e8ab0127e9b (diff) | |
download | mitmproxy-a9e002af18b82a6f476507a9ff03eebcc19f867c.tar.gz mitmproxy-a9e002af18b82a6f476507a9ff03eebcc19f867c.tar.bz2 mitmproxy-a9e002af18b82a6f476507a9ff03eebcc19f867c.zip |
Merge pull request #2337 from MatthewShao/jest-dev
[WIP][web] Add tests for UI components
Diffstat (limited to 'web/src/js/__tests__/ducks/tutils.js')
-rw-r--r-- | web/src/js/__tests__/ducks/tutils.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/web/src/js/__tests__/ducks/tutils.js b/web/src/js/__tests__/ducks/tutils.js index 6ae7f080..f140222d 100644 --- a/web/src/js/__tests__/ducks/tutils.js +++ b/web/src/js/__tests__/ducks/tutils.js @@ -7,3 +7,30 @@ export function createStore(parts) { applyMiddleware(...[thunk]) ) } + +export function TFlow(intercepted=false, marked=false, modified=false) { + return { + intercepted , + marked, + modified, + id: "foo", + request: { + scheme: 'http', + is_replay: true, + method: 'GET', + contentLength: 100 + }, + response: { + status_code: 200, + headers: [["Content-Type", 'text/html']], + timestamp_end: 200 + }, + error: { + msg: '' + }, + server_conn: { + timestamp_start: 100 + }, + type: 'http' + } +} |