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

Add guard for global.navigation in Column.jsx #183

Merged
merged 1 commit into from
Sep 13, 2017

Conversation

PMByrne
Copy link
Contributor

@PMByrne PMByrne commented Sep 13, 2017

Because the Column.jsx is making use of global.navigator without any guard, you cannot shallow render any component that imports react-redux-grid.

This means that you have to mock out any imports of react-redux-grid to test the components that wrap them.

Simply adding a check for navigator allows the parent component that imports react-redux-grid to be shallowly rendered and tested.

Another possible solution would be to run the check each time Column.render is called but I didn't go this route to preserve the current performance characteristic of the current isChrome check.

@codecov-io
Copy link

codecov-io commented Sep 13, 2017

Codecov Report

Merging #183 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #183   +/-   ##
=======================================
  Coverage   75.98%   75.98%           
=======================================
  Files         112      112           
  Lines        5143     5143           
  Branches      366      366           
=======================================
  Hits         3908     3908           
  Misses        958      958           
  Partials      277      277
Impacted Files Coverage Δ
src/components/layout/header/Column.jsx 78.03% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4d7c3f7...6c1fc15. Read the comment docs.

@bencripps bencripps merged commit a3e733f into bencripps:master Sep 13, 2017
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.

None yet

4 participants