Fix tests in frontend
This commit is contained in:
@@ -15,8 +15,10 @@ describe('TimeAdjuster', () => {
|
||||
const { container } = render(<TimeAdjuster onTimeChange={handleChange} />);
|
||||
const input = container.querySelector('input');
|
||||
|
||||
vi.clearAllMocks();
|
||||
|
||||
fireEvent.change(input!, { target: { value: '2024-01-01T12:00' } });
|
||||
expect(handleChange).toHaveBeenCalledWith('2024-01-01T12:00');
|
||||
expect(handleChange).toHaveBeenCalledWith(new Date('2024-01-01T12:00').toISOString());
|
||||
});
|
||||
|
||||
it('resets to now when reset button is clicked', async () => {
|
||||
|
||||
Reference in New Issue
Block a user