diff --git a/packages/react-relay/__tests__/ReactRelayFragmentContainer-test.js b/packages/react-relay/__tests__/ReactRelayFragmentContainer-test.js index c5b0847ab32c6..afbe15ba66ba1 100644 --- a/packages/react-relay/__tests__/ReactRelayFragmentContainer-test.js +++ b/packages/react-relay/__tests__/ReactRelayFragmentContainer-test.js @@ -640,7 +640,7 @@ describe('ReactRelayFragmentContainer', () => { describe('concurrent mode', () => { function assertYieldsWereCleared(_scheduler) { - const actualYields = _scheduler.unstable_clearYields(); + const actualYields = _scheduler.unstable_clearLog(); if (actualYields.length !== 0) { throw new Error( 'Log of yielded values is not empty. ' + @@ -653,7 +653,7 @@ describe('ReactRelayFragmentContainer', () => { const Scheduler = require('scheduler'); assertYieldsWereCleared(Scheduler); Scheduler.unstable_flushAllWithoutAsserting(); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields).toEqual(expectedYields); } @@ -661,14 +661,14 @@ describe('ReactRelayFragmentContainer', () => { const Scheduler = require('scheduler'); assertYieldsWereCleared(Scheduler); Scheduler.unstable_flushNumberOfYields(expectedYields.length); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields).toEqual(expectedYields); } it('upon commit, it should pick up changes in data that happened before comitting', () => { const Scheduler = require('scheduler'); const YieldChild = props => { - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; }; const YieldyUserComponent = ({user}) => { diff --git a/packages/react-relay/__tests__/ReactRelayQueryRenderer-test.js b/packages/react-relay/__tests__/ReactRelayQueryRenderer-test.js index 21fff48e813d5..8fc4140aa6655 100644 --- a/packages/react-relay/__tests__/ReactRelayQueryRenderer-test.js +++ b/packages/react-relay/__tests__/ReactRelayQueryRenderer-test.js @@ -142,9 +142,9 @@ describe('ReactRelayQueryRenderer', () => { it('fetches the query only once, renders loading state', () => { environment.mockClear(); function Child(props) { - // NOTE the unstable_yield method will move to the static renderer. + // NOTE the log method will move to the static renderer. // When React sync runs we need to update this. - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; } @@ -173,7 +173,7 @@ describe('ReactRelayQueryRenderer', () => { // Flush some of the changes, but don't commit Scheduler.unstable_flushNumberOfYields(2); - expect(Scheduler.unstable_clearYields()).toEqual(['A', 'B']); + expect(Scheduler.unstable_clearLog()).toEqual(['A', 'B']); expect(renderer.toJSON()).toEqual(null); expect({ error: null, @@ -214,7 +214,7 @@ describe('ReactRelayQueryRenderer', () => { function Child(props) { // NOTE the unstable_yield method will move to the static renderer. // When React sync runs we need to update this. - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; } @@ -244,7 +244,7 @@ describe('ReactRelayQueryRenderer', () => { // Flush some of the changes, but don't commit Scheduler.unstable_flushNumberOfYields(2); - expect(Scheduler.unstable_clearYields()).toEqual(['A', 'B']); + expect(Scheduler.unstable_clearLog()).toEqual(['A', 'B']); expect(renderer.toJSON()).toEqual(null); expect({ error: null, @@ -300,9 +300,9 @@ describe('ReactRelayQueryRenderer', () => { }); function Child(props) { - // NOTE the unstable_yieldValue method will move to the static renderer. + // NOTE the log method will move to the static renderer. // When React sync runs we need to update this. - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; } @@ -332,7 +332,7 @@ describe('ReactRelayQueryRenderer', () => { // Flush some of the changes, but don't commit Scheduler.unstable_flushNumberOfYields(2); - expect(Scheduler.unstable_clearYields()).toEqual(['A', 'B']); + expect(Scheduler.unstable_clearLog()).toEqual(['A', 'B']); expect(renderer.toJSON()).toEqual(null); expect({ error: null, diff --git a/packages/react-relay/__tests__/ReactRelayRefetchContainer-test.js b/packages/react-relay/__tests__/ReactRelayRefetchContainer-test.js index cafd5be640fcd..09c2c9a25e007 100644 --- a/packages/react-relay/__tests__/ReactRelayRefetchContainer-test.js +++ b/packages/react-relay/__tests__/ReactRelayRefetchContainer-test.js @@ -1087,7 +1087,7 @@ describe('ReactRelayRefetchContainer', () => { describe('concurrent mode', () => { function assertYieldsWereCleared(_scheduler) { - const actualYields = _scheduler.unstable_clearYields(); + const actualYields = _scheduler.unstable_clearLog(); if (actualYields.length !== 0) { throw new Error( 'Log of yielded values is not empty. ' + @@ -1100,7 +1100,7 @@ describe('ReactRelayRefetchContainer', () => { const Scheduler = require('scheduler'); assertYieldsWereCleared(Scheduler); Scheduler.unstable_flushAllWithoutAsserting(); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields).toEqual(expectedYields); } @@ -1108,14 +1108,14 @@ describe('ReactRelayRefetchContainer', () => { const Scheduler = require('scheduler'); assertYieldsWereCleared(Scheduler); Scheduler.unstable_flushNumberOfYields(expectedYields.length); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields).toEqual(expectedYields); } it('upon commit, it should pick up changes in data that happened before comitting', () => { const Scheduler = require('scheduler'); const YieldChild = props => { - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; }; const YieldyUserComponent = ({user, relay}) => { diff --git a/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js b/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js index ab2eb9109ca76..a4de2e178d987 100644 --- a/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useBlockingPaginationFragment-with-suspense-transition-test.js @@ -94,14 +94,14 @@ describe('useBlockingPaginationFragment with useTransition', () => { result.isPendingNext = isPendingNext; useEffect(() => { - Scheduler.unstable_yieldValue({data, ...result}); + Scheduler.log({data, ...result}); }); return {data, ...result}; } function assertYieldsWereCleared() { - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); if (actualYields.length !== 0) { throw new Error( 'Log of yielded values is not empty. ' + @@ -135,7 +135,7 @@ describe('useBlockingPaginationFragment with useTransition', () => { ) { assertYieldsWereCleared(); Scheduler.unstable_flushNumberOfYields(expectedYields.length); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields.length).toEqual(expectedYields.length); expectedYields.forEach((expected, idx) => assertYield(expected, actualYields[idx]), @@ -429,7 +429,7 @@ describe('useBlockingPaginationFragment with useTransition', () => { const Fallback = () => { useEffect(() => { - Scheduler.unstable_yieldValue('Fallback'); + Scheduler.log('Fallback'); }); return 'Fallback'; @@ -1052,7 +1052,7 @@ describe('useBlockingPaginationFragment with useTransition', () => { }); Scheduler.unstable_flushNumberOfYields(1); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); if (flushFallback) { // Flushing fallbacks by running a timer could cause other side-effects diff --git a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js index 0cedebbc601f5..73d3b1fc23c42 100644 --- a/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useFragmentNode-test.js @@ -50,7 +50,7 @@ disallowWarnings(); const {useEffect, useMemo, useState} = React; function assertYieldsWereCleared(_scheduler: any) { - const actualYields = _scheduler.unstable_clearYields(); + const actualYields = _scheduler.unstable_clearLog(); if (actualYields.length !== 0) { throw new Error( 'Log of yielded values is not empty. ' + @@ -61,7 +61,7 @@ function assertYieldsWereCleared(_scheduler: any) { function expectSchedulerToHaveYielded(expectedYields: any) { const Scheduler = require('scheduler'); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields).toEqual(expectedYields); } @@ -69,7 +69,7 @@ function flushScheduler() { const Scheduler = require('scheduler'); assertYieldsWereCleared(Scheduler); Scheduler.unstable_flushAllWithoutAsserting(); - return Scheduler.unstable_clearYields(); + return Scheduler.unstable_clearLog(); } function expectSchedulerToFlushAndYield(expectedYields: any) { @@ -81,7 +81,7 @@ function expectSchedulerToFlushAndYieldThrough(expectedYields: any) { const Scheduler = require('scheduler'); assertYieldsWereCleared(Scheduler); Scheduler.unstable_flushNumberOfYields(expectedYields.length); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields).toEqual(expectedYields); } @@ -856,7 +856,7 @@ describe.each([ const YieldChild = (props: any) => { // NOTE the unstable_yield method will move to the static renderer. // When React sync runs we need to update this. - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; }; const YieldyUserComponent = ({user}: any) => ( @@ -1058,7 +1058,7 @@ describe.each([ it('should ignore updates to initially rendered data when variables change', () => { const Scheduler = require('scheduler'); const YieldChild = (props: any) => { - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; }; const YieldyUserComponent = ({user}: any) => ( @@ -1387,7 +1387,7 @@ describe.each([ it('upon commit, it should pick up changes in data that happened before comitting', () => { const Scheduler = require('scheduler'); const YieldChild = (props: any) => { - Scheduler.unstable_yieldValue(props.children); + Scheduler.log(props.children); return props.children; }; const YieldyUserComponent = ({user}: any) => { diff --git a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js index db698f58ecf4b..64f60d3e039ae 100644 --- a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-test.js @@ -396,7 +396,7 @@ describe.each([ const Fallback = () => { useEffect(() => { - Scheduler.unstable_yieldValue('Fallback'); + Scheduler.log('Fallback'); }); return 'Fallback'; diff --git a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js index f8911dc62fdd4..3e763073519f5 100644 --- a/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js +++ b/packages/react-relay/relay-hooks/__tests__/useRefetchableFragmentNode-with-suspense-transition-test.js @@ -72,14 +72,14 @@ describe('useRefetchableFragmentNode with useTransition', () => { }; useLayoutEffect(() => { - Scheduler.unstable_yieldValue({data, isPending}); + Scheduler.log({data, isPending}); }); return {data, ...result}; } function assertYieldsWereCleared() { - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); if (actualYields.length !== 0) { throw new Error( 'Log of yielded values is not empty. ' + @@ -104,7 +104,7 @@ describe('useRefetchableFragmentNode with useTransition', () => { ) { assertYieldsWereCleared(); Scheduler.unstable_flushAllWithoutAsserting(); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields.length).toEqual(expectedYields.length); expectedYields.forEach((expected, idx) => assertYield(expected, actualYields[idx]), @@ -114,7 +114,7 @@ describe('useRefetchableFragmentNode with useTransition', () => { function expectNoYields() { assertYieldsWereCleared(); Scheduler.unstable_flushAllWithoutAsserting(); - const actualYields = Scheduler.unstable_clearYields(); + const actualYields = Scheduler.unstable_clearLog(); expect(actualYields.length).toEqual(0); } @@ -295,7 +295,7 @@ describe('useRefetchableFragmentNode with useTransition', () => { const Fallback = () => { useLayoutEffect(() => { - Scheduler.unstable_yieldValue('Fallback'); + Scheduler.log('Fallback'); }); return 'Fallback';