Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Nov 24, 2023
1 parent a6f48ae commit 4552d6d
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ describe('useSwimlaneInputResolver', () => {
const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

const renderCallbacks = {
onRenderComplete: jest.fn(),
onLoading: jest.fn(),
onError: jest.fn(),
};
Expand Down Expand Up @@ -113,7 +112,6 @@ describe('useSwimlaneInputResolver', () => {
expect(services[2].anomalyTimelineService.loadOverallData).toHaveBeenCalledTimes(1);

expect(renderCallbacks.onLoading).toHaveBeenCalledTimes(1);
expect(renderCallbacks.onRenderComplete).toHaveBeenCalledTimes(1);

await act(async () => {
embeddableInput.next({
Expand All @@ -130,7 +128,6 @@ describe('useSwimlaneInputResolver', () => {
expect(services[2].anomalyTimelineService.loadOverallData).toHaveBeenCalledTimes(2);

expect(renderCallbacks.onLoading).toHaveBeenCalledTimes(2);
expect(renderCallbacks.onRenderComplete).toHaveBeenCalledTimes(2);

await act(async () => {
embeddableInput.next({
Expand All @@ -147,7 +144,6 @@ describe('useSwimlaneInputResolver', () => {
expect(services[2].anomalyTimelineService.loadOverallData).toHaveBeenCalledTimes(3);

expect(renderCallbacks.onLoading).toHaveBeenCalledTimes(3);
expect(renderCallbacks.onRenderComplete).toHaveBeenCalledTimes(3);
});

test('should not complete the observable on error', async () => {
Expand Down

0 comments on commit 4552d6d

Please sign in to comment.