1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

fix datepicker tests

This commit is contained in:
steve 2024-01-17 20:43:10 +03:00
parent 7234f9f044
commit 2b06d8cf1c

View file

@ -3,9 +3,6 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react'
import { DatePicker } from './'
import { DateTime } from 'luxon'
// Set date to Oct 29, 2021 to keep snapshots consistent
beforeAll(() => jest.useFakeTimers().setSystemTime(new Date('2021-10-29 12:00:00')))
// DatePicker configuration
const minDate = DateTime.now().minus({ years: 2 })
const maxDate = DateTime.now()
@ -74,6 +71,8 @@ describe('<DatePicker />', () => {
const currentMonth = DateTime.now()
const priorMonth = DateTime.now().minus({ months: 1 })
console.log(DateTime.now(), 'date')
// Open the modal
fireEvent.click(screen.getByTestId('datepicker-toggle-icon'))