Skip to content

Commit

Permalink
test shenanigans
Browse files Browse the repository at this point in the history
  • Loading branch information
gnoff committed Oct 21, 2022
1 parent 2d9d0ca commit edfb246
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/react-dom/src/__tests__/ReactDOMFloat-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,14 @@ describe('ReactDOMFloat', () => {
</html>
</>,
);
expect(Scheduler).toFlushWithoutYielding();
try {
expect(Scheduler).toFlushWithoutYielding();
} catch (e) {
// for DOMExceptions that happen when expecting this test to fail we need
// to clear the scheduler first otherwise the expected failure will fail
expect(Scheduler).toFlushWithoutYielding();
throw e;
}
expect(getMeaningfulChildren(document)).toEqual(
<html>
<head>
Expand Down

0 comments on commit edfb246

Please sign in to comment.