New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] Add tests for components/EventLog & components/FlowView #2359

Merged
merged 9 commits into from May 31, 2017

Conversation

Projects
None yet
2 participants
@MatthewShao
Contributor

MatthewShao commented May 29, 2017

  • EventList.jsx
  • Details.jsx
  • Header.jsx
  • Message.jsx
  • Nav.jsx
  • ToggleEdit.jsx

@MatthewShao MatthewShao changed the title from [web] Add tests for js/components/EventLog/EventList.jsx to [web] Add tests for components/EventLog && components/FlowView May 30, 2017

@MatthewShao MatthewShao changed the title from [web] Add tests for components/EventLog && components/FlowView to [web] Add tests for components/EventLog & components/FlowView May 30, 2017

@@ -2,14 +2,15 @@ import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import classnames from 'classnames'
import _ from 'lodash'

This comment has been minimized.

@mhils

mhils May 31, 2017

Member

Any idea why this worked before?

@mhils

mhils May 31, 2017

Member

Any idea why this worked before?

This comment has been minimized.

@MatthewShao

MatthewShao May 31, 2017

Contributor

Without this statement, it works fine in the the browser, but it will fail the tests. Throwing ReferenceError: _ is not defined. I guess it is because lodash has been import by other part of our js code, but here, when we doing unit tests, it just fails to find _.

@MatthewShao

MatthewShao May 31, 2017

Contributor

Without this statement, it works fine in the the browser, but it will fail the tests. Throwing ReferenceError: _ is not defined. I guess it is because lodash has been import by other part of our js code, but here, when we doing unit tests, it just fails to find _.

Show outdated Hide outdated web/src/js/__tests__/components/FlowView/MessagesSpec.js
@mhils

Awesome! Remove the mock-xmlhttprequest dependency and this LGTM! 😃

@mhils mhils merged commit f4567bc into mitmproxy:master May 31, 2017

4 checks passed

codecov/patch Coverage not affected when comparing ec7d7c9...a538754
Details
codecov/project 86.87% (+1.27%) compared to ec7d7c9
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@mhils

This comment has been minimized.

Show comment
Hide comment
@mhils

mhils May 31, 2017

Member

\o/

Member

mhils commented May 31, 2017

\o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment