Skip to content

Commit

Permalink
Remove waitForElement from test case
Browse files Browse the repository at this point in the history
Aside from being deprecated in later versions(
testing-library/dom-testing-library#416) it's also
not needed here, as we can just return `findByDisplayValue` directly
  • Loading branch information
Robert Main committed Nov 15, 2021
1 parent 275ee8d commit 1e3f86d
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { waitForElement } from '@testing-library/react';
import { render } from 'test-utils';
import CoursesPage from 'client/components/pages/Courses/CoursesPage';

Expand All @@ -10,8 +9,6 @@ describe('View selection dropdown', function () {
coursePage = render(<CoursesPage />);
});
it('defaults to the default view', async function () {
return waitForElement(
() => coursePage.findByDisplayValue(/Default/, { exact: false })
);
return coursePage.findByDisplayValue(/Default/, { exact: false });
});
});

0 comments on commit 1e3f86d

Please sign in to comment.