Overriding dayjs today's value

Viewed 16

I have a datepicker component, that uses dayjs to manage dates.

I also run Visual Regression tests using Chromatic and have an issue there. Because the today's date is marked in blue, the VR tests fail everyday.

To get today's value I just run the dayjs() function

How can I globally override the dayjs() default return value to always return the same date, so that other functionality stays the same?

0 Answers
Related