sentry icon indicating copy to clipboard operation
sentry copied to clipboard

test(ui): Mock out react-date-range in tests

Open malwilley opened this issue 2 years ago • 0 comments

When writing some tests for the new search date picker, I found that the react-date-range calendar was causing timeouts due to the heaviness of it. So I think it could be prudent to replace it with an <input type="date" /> in tests. This will make the tests run much faster while also making it much easier to select dates in component tests.

The downside of this of course is that our tests won't completely match what's being rendered. Perhaps we can unmock this in specific tests if that's ever a concern.

malwilley avatar Aug 03 '22 18:08 malwilley