question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trying to test it with react-test-renderer does not work

See original GitHub issue

Just importing the component gives error:

 ReferenceError: MutationObserver is not defined
      
      at Object.<anonymous> (node_modules/@webcomponents/shadydom/shadydom.min.js:16:377)
      at Object.<anonymous> (node_modules/@webcomponents/shadydom/shadydom.min.js:66:338)
      at Object.<anonymous>.Object.defineProperty.value (node_modules/react-styled-select/lib/Select/Select.js:5:986)
      at Object.<anonymous> (node_modules/react-styled-select/lib/Select/Select.js:13:3)
      at Object.<anonymous>.Object.defineProperty.value (node_modules/react-styled-select/lib/index.js:5:40)
      at Object.<anonymous> (node_modules/react-styled-select/lib/index.js:13:3)
      at Object.<anonymous> (src/components/common/select/select.js:2:26)
      at Object.<anonymous> (src/__tests__/select.test.js:5:15)
          at Generator.next (<anonymous>)
          at Promise (<anonymous>)
          at Generator.next (<anonymous>)
          at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:188:7)

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
agutolicommented, Feb 26, 2018

Hi, sorry about that, I will see it as soon as possible!

0reactions
iansolanocommented, Mar 6, 2018

@agutoli sorry about the delay. Still failing: image

image

This is the install from 2.1.2-alpha: image

I wonder if the version of react-shadow is a problem here? I don’t know. Sorry, ATM I don’t really have the time to look into this and help out. If I find some free time I’ll try to take a look. Hopefully this helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Renderer - React
This will not work if the root element is a function component because they don't have instances. testRenderer.root. testRenderer.root. Returns the root “test ......
Read more >
react-test-renderer does not work with ref methods · Issue #5462
For refs to work and have usable mock methods. I did some digging through other issues and it looks like this was fixed...
Read more >
Error while trying to render a react component for tests
I am trying to use create from react-test-renderer to render a component. That's what I'm trying to do import { ReactTestRenderer, create} ...
Read more >
Testing React Components with react-test-renderer, and the ...
Learn how to test React components with react-test-renderer, and the Act API.
Read more >
Troubleshooting | React Native Testing Library - Open Source
This guide describes common issues found by users when integrating React Native Test ... Matching React Native, React & React Test Renderer versions​....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found