refactor(cli): integrate real config loading into async test utils (#23040)

This commit is contained in:
Tommaso Sciortino
2026-03-19 17:05:33 +00:00
committed by GitHub
parent 7de0616229
commit 23264ced9a
103 changed files with 1806 additions and 1541 deletions

View File

@@ -29,7 +29,7 @@ describe('<CompressionMessage />', () => {
describe('pending state', () => {
it('renders pending message when compression is in progress', async () => {
const props = createCompressionProps({ isPending: true });
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = await renderWithProviders(
<CompressionMessage {...props} />,
);
await waitUntilReady();
@@ -48,7 +48,7 @@ describe('<CompressionMessage />', () => {
newTokenCount: 50,
compressionStatus: CompressionStatus.COMPRESSED,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = await renderWithProviders(
<CompressionMessage {...props} />,
);
await waitUntilReady();
@@ -73,9 +73,8 @@ describe('<CompressionMessage />', () => {
newTokenCount: newTokens,
compressionStatus: CompressionStatus.COMPRESSED,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<CompressionMessage {...props} />,
);
const { lastFrame, waitUntilReady, unmount } =
await renderWithProviders(<CompressionMessage {...props} />);
await waitUntilReady();
const output = lastFrame();
@@ -99,7 +98,7 @@ describe('<CompressionMessage />', () => {
compressionStatus:
CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = await renderWithProviders(
<CompressionMessage {...props} />,
);
await waitUntilReady();
@@ -120,7 +119,7 @@ describe('<CompressionMessage />', () => {
compressionStatus:
CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = await renderWithProviders(
<CompressionMessage {...props} />,
);
await waitUntilReady();
@@ -159,9 +158,8 @@ describe('<CompressionMessage />', () => {
newTokenCount: newTokens,
compressionStatus: CompressionStatus.COMPRESSED,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<CompressionMessage {...props} />,
);
const { lastFrame, waitUntilReady, unmount } =
await renderWithProviders(<CompressionMessage {...props} />);
await waitUntilReady();
const output = lastFrame();
@@ -184,9 +182,8 @@ describe('<CompressionMessage />', () => {
compressionStatus:
CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<CompressionMessage {...props} />,
);
const { lastFrame, waitUntilReady, unmount } =
await renderWithProviders(<CompressionMessage {...props} />);
await waitUntilReady();
const output = lastFrame();
@@ -212,9 +209,8 @@ describe('<CompressionMessage />', () => {
compressionStatus:
CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
<CompressionMessage {...props} />,
);
const { lastFrame, waitUntilReady, unmount } =
await renderWithProviders(<CompressionMessage {...props} />);
await waitUntilReady();
const output = lastFrame();
@@ -232,7 +228,7 @@ describe('<CompressionMessage />', () => {
isPending: false,
compressionStatus: CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = await renderWithProviders(
<CompressionMessage {...props} />,
);
await waitUntilReady();
@@ -251,7 +247,7 @@ describe('<CompressionMessage />', () => {
compressionStatus:
CompressionStatus.COMPRESSION_FAILED_TOKEN_COUNT_ERROR,
});
const { lastFrame, waitUntilReady, unmount } = renderWithProviders(
const { lastFrame, waitUntilReady, unmount } = await renderWithProviders(
<CompressionMessage {...props} />,
);
await waitUntilReady();