'React Testing Library Not Parsing JSON
I have a TextArea component that takes JSON {"someKey": "someValue"}. When I inspect the dom, {"someKey": "someValue"} shows up just fine in the inspector.
However, when I try react testing library, RTL thinks the TextArea seems to contain "[object Object]" which isn't JSON parseable.
Any insight into
- Why RTL is interpreting this json as "[object Object]"
- How I can test it? I'd like to assert the value I typed in is there
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|
