Skip to content

Commit 432b1f0

Browse files
committed
fix test
1 parent 0323d4e commit 432b1f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/react-server-dom-webpack/src/__tests__/ReactFlightDOM-test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -623,15 +623,15 @@ describe('ReactFlightDOM', () => {
623623
);
624624
});
625625

626-
it('throws when await a client module prop of client exports', () => {
626+
it('throws when await a client module prop of client exports', async () => {
627627
const ClientModule = clientExports({
628628
Component: {deep: 'thing'},
629629
});
630630
async function awaitExport() {
631-
const mod = await ClientModule
632-
return await Promise.resolve(mod.Component)
631+
const mod = await ClientModule;
632+
return await Promise.resolve(mod.Component);
633633
}
634-
expect(awaitExport).toThrowError(
634+
await expect(awaitExport()).rejects.toThrowError(
635635
`Cannot await or return from a thenable. ` +
636636
`You cannot await a client module from a server component.`,
637637
);

0 commit comments

Comments
 (0)