Open KutnerUri opened 2 years ago
Hey @KutnerUri @Eliav2 ,
Any updates on this ? I am also experiencing it.
Meanwhile, I did not figured out the fix but did a workaround by disabling XArrows only in testing enviroment ( enabling it outside of testing enviroment basically )
{process.env.JEST_WORKER_ID === undefined && <ComponentWithXarrow > }
I don't remember how I got around this.
Any update on this?
I get the same error using Jest and React testing library with TypeScript. Any updates?
Seems to still be no updates on this one...
For the time being, I have been working around it similar to DiaconuDan
{process.env.NODE_ENV !== 'test' && <Xarrow ... />
But definitely not an ideal solution!
I was able to bypass it by mocking the component (I prefer not to conditionally render it based on the NODE_ENV).
jest.mock('react-xarrows', () => {
return {
__esModule: true,
default: () => <span />,
useXarrow: () => null,
};
});
getting this error during tests: (Seems to be related to #72)
version: 2.0.2 using Jest and react testing library.