terra-status-view TypeError: Object.values is not a function
See original GitHub issueIssue Description
We’re trying to consume the terra-status-view component, which works as expected; but all our jest tests are failing. Here’s a screencap of the errors, it fails on our import lines:
It is failing on this line:
variant: _propTypes2.default.oneOf(Object.values(variants))
All research points to babel-polyfill being the culprit.
Issue Type
- New Feature
- Enhancement
- Bug
- Other
Expected Behavior
It should not error when running jest tests.
Steps to Reproduce
- import terra-status-view
- Run jest tests
Environment
- Component Version: 1.0.1
- Browser Name and Version: N/A
- Operating System and version (desktop or mobile): N/A
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Uncaught TypeError: Object.values is not a function ...
I need to create two arrays. The first array is an array of all the keys from the object. I created this array...
Read more >TypeError: Object.values is not a function #3687
My tests works fine on Jest 19.0.0, but it breaks when I upgrade to Jest 20.0.4 with the following error: TypeError: Object.values is...
Read more >Error TypeError Object values is not a function
values is not a function. I have seen that Object.values() is not supported in all browsers. But I am using the function in...
Read more >Object.values() In JavaScript
It causes a TypeError if the argument passed is not an object. If an object is not passed as an argument to the...
Read more >Javascript ES6 – TypeError: Object.entries is not a function
TypeError: Object.entries is not a function. It means that you are using Object.entries() function in your code (or one of your JS dependencies...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I believe I was running 6.11.1 at the time. I was just thinking it might be a good idea to mark it in the terra-status-view’s readme that Node should be v. 8.9+
@PseudoFaux, what version were you on? We’ve documented in the .nvmrc and package.json that we use node 8.9.2
https://github.com/cerner/terra-core/blob/master/.nvmrc https://github.com/cerner/terra-core/blob/master/package.json#L7