GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add ReactDOMClient to ServerIntegration(Hooks|NewContext) by rickhanlonii · Pull Request #28135 · react/react

Add ReactDOMClient to ServerIntegration(Hooks|NewContext) #28135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
rickhanlonii merged 3 commits into main from rh/server-test-utils-hooks
Feb 1, 2024

Uh oh!

There was an error while loading. Please reload this page.

Merged

Add ReactDOMClient to ServerIntegration(Hooks|NewContext) #28135

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit Hold shift + click to select a range
e204d76
Add ReactDOMClient to ServerIntegrationTestUtils
rickhanlonii Jan 27, 2024
b200a8b
Add ReactDOMClient to ServerIntegrationHooks
rickhanlonii Jan 28, 2024
1365876
Handle different error counts depending on renderer
Jan 28, 2024
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Next Next commit
Add ReactDOMClient to ServerIntegrationHooks
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@rickhanlonii
rickhanlonii committed Feb 1, 2024
commit b200a8ba4b25454f0f351843cd4f820780efff42

There are no files selected for viewing

11 changes: 7 additions & 4 deletions 11 packages/react-dom/src/__tests__/ReactDOMServerIntegrationHooks-test.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');

let React;
let ReactDOM;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;
let useState;
Expand All @@ -39,7 +39,7 @@ function initModules() {
jest.resetModules();

React = require('react');
ReactDOM = require('react-dom');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');
useState = React.useState;
Expand Down Expand Up @@ -67,7 +67,7 @@ function initModules() {

// Make them available to the helpers.
return {
ReactDOM,
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
Expand Down Expand Up @@ -422,7 +422,7 @@ describe('ReactDOMServerHooks', () => {
});
return 'hi';
}

// TODO: fails due to render error retry
const domNode = await render(<App />, 1);
expect(domNode.textContent).toEqual('hi');
});
Expand All @@ -436,6 +436,7 @@ describe('ReactDOMServerHooks', () => {
return value;
}

// TODO: fails due to render error retry
const domNode = await render(<App />, 1);
expect(domNode.textContent).toEqual('0');
});
Expand Down Expand Up @@ -859,9 +860,11 @@ describe('ReactDOMServerHooks', () => {
return <Text text={count} />;
}

// TODO: fails due to render error retry
const domNode1 = await render(<ReadInMemo />, 1);
expect(domNode1.textContent).toEqual('42');

// TODO: fails due to render error retry
const domNode2 = await render(<ReadInReducer />, 1);
expect(domNode2.textContent).toEqual('42');
});
Expand Down
8 changes: 5 additions & 3 deletions 8 packages/react-dom/src/__tests__/ReactDOMServerIntegrationNewContext-test.js
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@
const ReactDOMServerIntegrationUtils = require('./utils/ReactDOMServerIntegrationTestUtils');

let React;
let ReactDOM;
let ReactDOMClient;
let ReactDOMServer;
let ReactTestUtils;

function initModules() {
// Reset warning cache.
jest.resetModules();
React = require('react');
ReactDOM = require('react-dom');
ReactDOMClient = require('react-dom/client');
ReactDOMServer = require('react-dom/server');
ReactTestUtils = require('react-dom/test-utils');

// Make them available to the helpers.
return {
ReactDOM,
ReactDOMClient,
ReactDOMServer,
ReactTestUtils,
};
Expand Down Expand Up @@ -365,6 +365,7 @@ describe('ReactDOMServerIntegration', () => {
</div>
);
};
// TODO: fails due to render error retry
// We expect 1 error.
await render(<App />, 1);
},
Expand All @@ -391,6 +392,7 @@ describe('ReactDOMServerIntegration', () => {
</div>
);
};
// TODO: fails due to render error retry
// We expect 1 error.
await render(<App />, 1);
},
Expand Down
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402809 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.