Skip to content

Commit

Permalink
Update test to use new utils
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 16, 2023
1 parent 72a8ad7 commit 443ceca
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ describe('ReactDOMFizzServer', () => {
},
);

it('can hydrate uSES in StrictMode with different client and server snapshot', async () => {
it.only('can hydrate uSES in StrictMode with different client and server snapshot', async () => {
function subscribe() {
return () => {};
}
Expand All @@ -2365,7 +2365,7 @@ describe('ReactDOMFizzServer', () => {
getClientSnapshot,
getServerSnapshot,
);
Scheduler.unstable_yieldValue(value);
Scheduler.log(value);

return value;
}
Expand All @@ -2380,12 +2380,16 @@ describe('ReactDOMFizzServer', () => {
const {pipe} = renderToPipeableStream(element);
pipe(writable);
});
expect(Scheduler).toHaveYielded(['Nay!']);

ReactDOMClient.hydrateRoot(container, element);
expect(() => {
expect(Scheduler).toFlushAndYield(['Nay!', 'Yay!']);
}).toErrorDev([]);
assertLog(['Nay!']);
expect(getVisibleChildren(container)).toEqual('Nay!');

await clientAct(() => {
ReactDOMClient.hydrateRoot(container, element);
});

expect(getVisibleChildren(container)).toEqual('Yay!');
assertLog(['Nay!', 'Yay!']);
});

it(
Expand Down

0 comments on commit 443ceca

Please sign in to comment.