Skip to content

Commit a8f46f5

Browse files
committed
Make RSC tests await act
1 parent 8e3dc9f commit a8f46f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

node_package/tests/RSCClientRoot.test.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ enableFetchMocks();
8787

8888
await act(async () => {
8989
pushFirstChunk();
90-
render();
90+
await render();
9191
});
9292
expect(window.fetch).toHaveBeenCalledWith('/rsc-render/TestComponent?props=undefined');
9393
expect(window.fetch).toHaveBeenCalledTimes(1);
@@ -108,7 +108,7 @@ enableFetchMocks();
108108
const { render, pushFirstChunk, pushSecondChunk, endStream } = await mockRSCRequest();
109109

110110
await act(async () => {
111-
render();
111+
await render();
112112
pushFirstChunk();
113113
});
114114
expect(consoleSpy).toHaveBeenCalledWith(
@@ -138,7 +138,7 @@ enableFetchMocks();
138138
const { render, pushFirstChunk, pushSecondChunk, endStream } = await mockRSCRequest('/rsc-render/');
139139

140140
await act(async () => {
141-
render();
141+
await render();
142142
pushFirstChunk();
143143
pushSecondChunk();
144144
endStream();

0 commit comments

Comments
 (0)