Skip to content

Problem testing a React component that uses parse #169

New issue

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

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

Already on GitHub? # to your account

Closed
tyagow opened this issue Jul 28, 2020 · 2 comments
Closed

Problem testing a React component that uses parse #169

tyagow opened this issue Jul 28, 2020 · 2 comments

Comments

@tyagow
Copy link

tyagow commented Jul 28, 2020

Expected Behavior

I should be able to test React components that use parse

Actual Behavior

     at parseDOM (../home/devusr/node_modules/html-dom-parser/lib/html-to-dom-server.js:24:3)
      at parse (../home/devusr/node_modules/html-react-parser/index.js:26:5)

Steps to Reproduce

Have a React component that users parse

import parse from 'html-react-parser';

[...]

        <p>{parse(newMessageText)}</p>
[...]

Run a test that mounts this component

## Reproducible Demo



## Environment

- Version:     "html-react-parser": "0.13.0",
- Platform:  Jest + docker
- Browser: - 
@remarkablemark
Copy link
Owner

Thanks for opening this issue @tyagow. Can you provide a reproducible example? Are you running tests in Node.js environment or browser environment?

@remarkablemark
Copy link
Owner

Closing issue due to inactivity. Feel free to reopen if you're still experiencing an issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants