Skip to content
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

refactor(*): propagate className/style on components #5

Merged
merged 1 commit into from
Apr 23, 2018

Conversation

topheman
Copy link
Owner

  • use classnames utility
  • default value of className/style = undefined (can also be spread)
  • remove props.data from src/components/Sparkline.js to prevent flowing into the DOM
  • setup src/testUtils.js
    • add jest-dom/extend-expect (custom matchers such as toBeInTheDOM, toHaveTextContent, toHaveAttribute, toHaveClass)
    • prepare renderWithRouter
  • added some basic unit tests

* use [classnames](https://www.npmjs.com/package/classnames) utility
* default value of className/style = `undefined` (can also be spread)
* remove `props.data` from `src/components/Sparkline.js` to prevent flowing into the DOM
* setup `src/testUtils.js`
  * add [jest-dom/extend-expect](https://www.npmjs.com/package/jest-dom) (custom matchers such as toBeInTheDOM, toHaveTextContent, toHaveAttribute, toHaveClass)
  * prepare `renderWithRouter`
* added some basic unit tests
@topheman topheman merged commit 242071f into master Apr 23, 2018
@topheman topheman deleted the refactor/add-flowing-style-className-props branch April 25, 2018 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant