Skip to content

Commit e737098

Browse files
committed
Remove comment
1 parent fb89dae commit e737098

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

packages/use-sync-external-store/src/__tests__/useSyncExternalStoreShared-test.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,14 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
2929
jest.resetModules();
3030

3131
if (gate(flags => flags.enableUseSyncExternalStoreShim)) {
32-
// Remove useSyncExternalStore from the React imports so that we use the
33-
// shim instead. Also removing startTransition, since we use that to
34-
// detect outdated 18 alphas that don't yet include useSyncExternalStore.
32+
// Test the shim against React 17.
3533
jest.mock('react', () => {
36-
const {
37-
// eslint-disable-next-line no-unused-vars
38-
startTransition: _,
39-
// eslint-disable-next-line no-unused-vars
40-
useSyncExternalStore: __,
41-
...otherExports
42-
} = jest.requireActual(
34+
return jest.requireActual(
4335
__DEV__
4436
? 'react-17/umd/react.development.js'
4537
: 'react-17/umd/react.production.min.js',
4638
);
47-
return otherExports;
4839
});
49-
5040
jest.mock('react-dom', () =>
5141
jest.requireActual(
5242
__DEV__
@@ -109,6 +99,7 @@ describe('Shared useSyncExternalStore behavior (shim and built-in)', () => {
10999
// createLegacyRoot directly.
110100
return ReactDOMClient.createRoot(container);
111101
} else {
102+
// This ReactDOM.render is from the React 17 npm module.
112103
ReactDOM.render(null, container);
113104
return {
114105
render(children) {

0 commit comments

Comments
 (0)