Skip to content

Commit

Permalink
Merge pull request #66 from Code-Hive-GmbH/fix/fix-test
Browse files Browse the repository at this point in the history
fix(test): fix testcase should not depend on today
  • Loading branch information
farhoudshapouran authored Feb 19, 2024
2 parents 284ed19 + 59a0283 commit faf46a7
Showing 1 changed file with 3 additions and 1 deletion.
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

0 comments on commit faf46a7

Please sign in to comment.