Skip to content

Commit

Permalink
Review feedback - reduce mock observable delay time to 10ms
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Sep 28, 2021
1 parent 8916b60 commit a160f99
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('ConditionsForm: ', () => {
});

it('renders a list of related condition concepts when the user types in the searchbox', async () => {
mockSearchConditionConcepts.mockReturnValueOnce(of(searchedCondition).pipe(delay(1000)));
mockSearchConditionConcepts.mockReturnValueOnce(of(searchedCondition).pipe(delay(10)));

expect(screen.queryByRole('menuitem', { name: /Headache/i })).not.toBeInTheDocument();
expect(screen.queryByDisplayValue('Headache')).not.toBeInTheDocument();
Expand All @@ -125,7 +125,7 @@ describe('ConditionsForm: ', () => {
});

it('renders an error message when no matching conditions are found', async () => {
mockSearchConditionConcepts.mockReturnValueOnce(of([]).pipe(delay(1000)));
mockSearchConditionConcepts.mockReturnValueOnce(of([]).pipe(delay(10)));

expect(screen.queryByRole('menuitem', { name: /Post-acute sequelae of COVID-19/i })).not.toBeInTheDocument();
expect(screen.queryByDisplayValue(/Post-acute sequelae of COVID-19/i)).not.toBeInTheDocument();
Expand Down

0 comments on commit a160f99

Please sign in to comment.