Skip to content
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.

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

Resolve references to deduped owner objects #30549

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add expectation to verify react flight client change
Previously, the test only covered the change in the react flight server.
  • Loading branch information
unstubbable committed Sep 23, 2024
commit 3a8b1ca348084a251d6dce3c514ef454e569d999
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,40 @@ describe('ReactFlightDOMBrowser', () => {
});

expect(container.innerHTML).toBe(expectedHtml);

if (__DEV__) {
const resolvedPath1b = await response.value[0].props.children[1]._payload;

expect(resolvedPath1b._owner).toEqual(
expect.objectContaining({
name: 'Svg1',
env: 'Server',
key: null,
owner: expect.objectContaining({
name: 'Server',
env: 'Server',
key: null,
owner: null,
}),
}),
);

const resolvedPath2 = response.value[1].props.children;

expect(resolvedPath2._owner).toEqual(
expect.objectContaining({
name: 'Svg2',
env: 'Server',
key: null,
owner: expect.objectContaining({
name: 'Server',
env: 'Server',
key: null,
owner: null,
}),
}),
);
}
});

it('should progressively reveal server components', async () => {
Expand Down
Loading