-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Aaron Chong <[email protected]>
- Loading branch information
1 parent
75b4b2c
commit ac51ab7
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
packages/rmf-dashboard-framework/src/components/tasks/task-schedule.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from 'react'; | ||
import { describe, it } from 'vitest'; | ||
|
||
import { RmfApiProvider } from '../../hooks'; | ||
import { MockRmfApi, render, TestProviders } from '../../utils/test-utils.test'; | ||
import { TaskSchedule } from './task-schedule'; | ||
|
||
describe('Task schedule', () => { | ||
const rmfApi = new MockRmfApi(); | ||
rmfApi.tasksApi.getScheduledTasksScheduledTasksGet = () => new Promise(() => {}); | ||
rmfApi.tasksApi.addExceptDateScheduledTasksTaskIdExceptDatePost = () => new Promise(() => {}); | ||
rmfApi.tasksApi.delScheduledTasksScheduledTasksTaskIdDelete = () => new Promise(() => {}); | ||
|
||
const Base = (props: React.PropsWithChildren<{}>) => { | ||
return ( | ||
<TestProviders> | ||
<RmfApiProvider value={rmfApi}>{props.children}</RmfApiProvider> | ||
</TestProviders> | ||
); | ||
}; | ||
|
||
it('Task schedule renders', async () => { | ||
render( | ||
<Base> | ||
<TaskSchedule /> | ||
</Base>, | ||
); | ||
}); | ||
}); |