Skip to content

Commit afb46a3

Browse files
author
Brian Vaughn
committed
Updated tests
1 parent cbc99e3 commit afb46a3

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

packages/react-reconciler/src/__tests__/ReactIncrementalErrorHandling-test.internal.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ describe('ReactIncrementalErrorHandling', () => {
5858
);
5959
}
6060

61-
// @gate experimental || !enableSyncDefaultUpdates
6261
it('recovers from errors asynchronously', () => {
6362
class ErrorBoundary extends React.Component {
6463
state = {error: null};
@@ -171,7 +170,6 @@ describe('ReactIncrementalErrorHandling', () => {
171170
expect(ReactNoop.getChildren()).toEqual([span('Caught an error: oops!')]);
172171
});
173172

174-
// @gate experimental || !enableSyncDefaultUpdates
175173
it('recovers from errors asynchronously (legacy, no getDerivedStateFromError)', () => {
176174
class ErrorBoundary extends React.Component {
177175
state = {error: null};
@@ -270,7 +268,6 @@ describe('ReactIncrementalErrorHandling', () => {
270268
expect(ReactNoop.getChildren()).toEqual([span('Caught an error: oops!')]);
271269
});
272270

273-
// @gate experimental
274271
it("retries at a lower priority if there's additional pending work", async () => {
275272
function App(props) {
276273
if (props.isBroken) {
@@ -378,7 +375,6 @@ describe('ReactIncrementalErrorHandling', () => {
378375
);
379376
});
380377

381-
// @gate experimental || !enableSyncDefaultUpdates
382378
it('retries one more time before handling error', () => {
383379
function BadRender({unused}) {
384380
Scheduler.unstable_yieldValue('BadRender');
@@ -429,7 +425,6 @@ describe('ReactIncrementalErrorHandling', () => {
429425
expect(ReactNoop.getChildren()).toEqual([]);
430426
});
431427

432-
// @gate experimental || !enableSyncDefaultUpdates
433428
it('retries one more time if an error occurs during a render that expires midway through the tree', async () => {
434429
function Oops({unused}) {
435430
Scheduler.unstable_yieldValue('Oops');
@@ -566,7 +561,6 @@ describe('ReactIncrementalErrorHandling', () => {
566561
expect(ReactNoop.getChildren()).toEqual([span('Caught an error: Hello.')]);
567562
});
568563

569-
// @gate experimental || !enableSyncDefaultUpdates
570564
it('catches render error in a boundary during partial deferred mounting', () => {
571565
class ErrorBoundary extends React.Component {
572566
state = {error: null};
@@ -757,7 +751,6 @@ describe('ReactIncrementalErrorHandling', () => {
757751
expect(ReactNoop.getChildren()).toEqual([]);
758752
});
759753

760-
// @gate experimental || !enableSyncDefaultUpdates
761754
it('propagates an error from a noop error boundary during partial deferred mounting', () => {
762755
class RethrowErrorBoundary extends React.Component {
763756
componentDidCatch(error) {
@@ -1842,7 +1835,6 @@ describe('ReactIncrementalErrorHandling', () => {
18421835
});
18431836
}
18441837

1845-
// @gate experimental
18461838
it('uncaught errors should be discarded if the render is aborted', async () => {
18471839
const root = ReactNoop.createRoot();
18481840

@@ -1875,7 +1867,6 @@ describe('ReactIncrementalErrorHandling', () => {
18751867
expect(root).toMatchRenderedOutput('Everything is fine.');
18761868
});
18771869

1878-
// @gate experimental
18791870
it('uncaught errors are discarded if the render is aborted, case 2', async () => {
18801871
const {useState} = React;
18811872
const root = ReactNoop.createRoot();

packages/react-reconciler/src/__tests__/useMutableSourceHydration-test.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,10 @@ describe('useMutableSourceHydration', () => {
370370
expect(Scheduler).toHaveYielded(['0:a:one', '1:b:two']);
371371
});
372372

373+
// @gate !enableSyncDefaultUpdates
373374
it('should detect a tear during a higher priority interruption', () => {
374375
const source = createSource('one');
375-
const mutableSource = createMutableSource(source, param => param.version);
376+
const mutableSource = Ω(source, param => param.version);
376377

377378
function Unrelated({flag}) {
378379
Scheduler.unstable_yieldValue(flag);

0 commit comments

Comments
 (0)