Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jun 22, 2024
1 parent f752a51 commit 0323d4e
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -625,12 +625,13 @@ describe('ReactFlightDOM', () => {

it('throws when await a client module prop of client exports', () => {
const ClientModule = clientExports({
Component: function () {},
Component: {deep: 'thing'},
});
async function read() {
return await ClientModule.Component;
async function awaitExport() {
const mod = await ClientModule
return await Promise.resolve(mod.Component)
}
expect(read).toThrowError(
expect(awaitExport).toThrowError(
`Cannot await or return from a thenable. ` +
`You cannot await a client module from a server component.`,
);
Expand Down

0 comments on commit 0323d4e

Please sign in to comment.