test: fix ExitWarning tests

This commit is contained in:
mkorwel
2026-04-18 02:14:16 +00:00
parent 8e8f97b506
commit 002ef712c8
@@ -24,7 +24,12 @@ describe('ExitWarning', () => {
ctrlCPressedOnce: false,
ctrlDPressedOnce: false,
} as unknown as UIState);
const { lastFrame, unmount } = await render(<ExitWarning />);
const { lastFrame, unmount } = await render(
<ExitWarning />,
undefined,
undefined,
true,
);
expect(lastFrame({ allowEmpty: true })).toBe('');
unmount();
});
@@ -57,7 +62,12 @@ describe('ExitWarning', () => {
ctrlCPressedOnce: true,
ctrlDPressedOnce: true,
} as unknown as UIState);
const { lastFrame, unmount } = await render(<ExitWarning />);
const { lastFrame, unmount } = await render(
<ExitWarning />,
undefined,
undefined,
true,
);
expect(lastFrame({ allowEmpty: true })).toBe('');
unmount();
});