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

@@ -64,7 +64,7 @@ describe('<SubagentGroupDisplay />', () => {
},
];
const renderSubagentGroup = (
const renderSubagentGroup = async (
toolCallsToRender: IndividualToolCallDisplay[],
height?: number,
) =>
@@ -78,12 +78,12 @@ describe('<SubagentGroupDisplay />', () => {
);
it('renders nothing if there are no agent tool calls', async () => {
const { lastFrame } = renderSubagentGroup([], 40);
const { lastFrame } = await renderSubagentGroup([], 40);
expect(lastFrame({ allowEmpty: true })).toBe('');
});
it('renders collapsed view by default with correct agent counts and states', async () => {
const { lastFrame, waitUntilReady } = renderSubagentGroup(
const { lastFrame, waitUntilReady } = await renderSubagentGroup(
mockToolCalls,
40,
);
@@ -92,7 +92,10 @@ describe('<SubagentGroupDisplay />', () => {
});
it('expands when availableTerminalHeight is undefined', async () => {
const { lastFrame, rerender } = renderSubagentGroup(mockToolCalls, 40);
const { lastFrame, rerender } = await renderSubagentGroup(
mockToolCalls,
40,
);
// Default collapsed view
await waitFor(() => {