Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jun 25, 2024
1 parent 0323d4e commit 432b1f0
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -623,15 +623,15 @@ describe('ReactFlightDOM', () => {
);
});

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

0 comments on commit 432b1f0

Please sign in to comment.