Hi,
running this simple test with Jest on a React component containing the DateRangePicker, I get the error Uncaught [TypeError: Cannot read property 'id' of undefined]
This is the test code:
import React from 'react';
import ReactDOM from 'react-dom';
Object.defineProperty(window, 'crypto', {
value: {
getRandomValues: arr => jest.fn().mockImplementation(arr => 0)
},
});
it("renders without crashing", () => {
const div = document.createElement("div");
ReactDOM.render(<MyComponent />,
div
);
ReactDOM.unmountComponentAtNode(div);
});
Please find attached the full error stack trace.
How can be fixed this issue?
Attachment:
jesterror.txt_4af641b4.zip