Skip to content

Commit

Permalink
and couple more changes wipe out from rebase/pull o.O
Browse files Browse the repository at this point in the history
  • Loading branch information
salazarm committed Oct 4, 2021
1 parent b1c9e62 commit c10215e
Showing 1 changed file with 9 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1057,9 +1057,9 @@ describe('ReactDOMServerSelectiveHydration', () => {
if (!ref.current) {
return;
}
ref.current.addEventListener('click', () => {
ref.current.onclick = () => {
Scheduler.unstable_yieldValue('Native Click ' + text);
});
};
}, [text]);
return (
<span
Expand Down Expand Up @@ -1089,16 +1089,13 @@ describe('ReactDOMServerSelectiveHydration', () => {
);
}

const finalHTML = ReactDOMServer.renderToString(<App />);
if (__DEV__) {
expect(console.error).toHaveBeenCalledTimes(2);
expect(console.error.calls.argsFor(0)[0]).toContain(
'useLayoutEffect does nothing on the server',
);
expect(console.error.calls.argsFor(1)[0]).toContain(
'useLayoutEffect does nothing on the server',
);
}
let finalHTML;
expect(() => {
finalHTML = ReactDOMServer.renderToString(<App />);
}).toErrorDev([
'useLayoutEffect does nothing on the server',
'useLayoutEffect does nothing on the server',
]);

expect(Scheduler).toHaveYielded(['App', 'A', 'B']);

Expand Down Expand Up @@ -1132,8 +1129,5 @@ describe('ReactDOMServerSelectiveHydration', () => {
expect(Scheduler).toFlushAndYield(['A']);

document.body.removeChild(container);
if (__DEV__) {
expect(console.error).toHaveBeenCalledTimes(2);
}
});
});

0 comments on commit c10215e

Please sign in to comment.