Skip to content

Commit

Permalink
task-schedule
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <[email protected]>
  • Loading branch information
aaronchongth committed Dec 18, 2024
1 parent 75b4b2c commit ac51ab7
Showing 1 changed file with 29 additions and 0 deletions.
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>,
);
});
});

0 comments on commit ac51ab7

Please sign in to comment.