test(cli): resolve React Context mocking discrepancies and stabilize core layout CI test suites

This commit is contained in:
mkorwel
2026-04-16 05:48:28 +00:00
parent ff8c7a61b3
commit cb0e1015ee
10 changed files with 154 additions and 218 deletions
@@ -40,7 +40,7 @@ describe('<UserIdentity />', () => {
vi.spyOn(mockConfig, 'getUserTierName').mockReturnValue(undefined);
const { lastFrame, unmount } = await renderWithProviders(
<UserIdentity config={mockConfig} />,
<UserIdentity config={mockConfig} emailOverride="test@example.com" />,
);
const output = lastFrame();
@@ -59,7 +59,7 @@ describe('<UserIdentity />', () => {
vi.spyOn(mockConfig, 'getUserTierName').mockReturnValue(undefined);
const { lastFrameRaw, unmount } = await renderWithProviders(
<UserIdentity config={mockConfig} />,
<UserIdentity config={mockConfig} emailOverride="test@example.com" />,
);
// Assert immediately on the first available frame before any async ticks happen
@@ -105,7 +105,7 @@ describe('<UserIdentity />', () => {
vi.spyOn(mockConfig, 'getUserTierName').mockReturnValue('Premium Plan');
const { lastFrame, unmount } = await renderWithProviders(
<UserIdentity config={mockConfig} />,
<UserIdentity config={mockConfig} emailOverride="test@example.com" />,
);
const output = lastFrame();