Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): fix testcase should not depend on today #66

Merged
merged 2 commits into from
Feb 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/__tests__/api.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import 'dayjs/locale/tr';

describe('API TESTS', () => {
test('should display the passed date', () => {
const selectedDate = new Date();
const selectedDate = new Date(2020, 11, 19);
const month = selectedDate.toLocaleString('en-US', { month: 'long' });

render(<DateTimePicker mode="single" date={selectedDate} />);
expect(screen.getByText(month)).toBeVisible();
expect(screen.getByText('19')).toBeVisible();
expect(screen.getByText('2020')).toBeVisible();
});

// test('minDate should be applied after init', () => {
Expand Down
Loading