diff --git a/apps/ai-game-creator-shell/tests/appSurface/auth.suite.ts b/apps/ai-game-creator-shell/tests/appSurface/auth.suite.ts index 375b53b2a..24b61408c 100644 --- a/apps/ai-game-creator-shell/tests/appSurface/auth.suite.ts +++ b/apps/ai-game-creator-shell/tests/appSurface/auth.suite.ts @@ -131,16 +131,12 @@ export function registerAuthTests() { return null; }); - await waitFor( - () => - expect( - rejections.reasons.some( - (reason) => - reason instanceof Error && - reason.message.includes('检查登录状态超时'), - ), - ).toBe(true), - { timeout: 20_000 }, + await waitFor(() => expect(rejections.reasons).toHaveLength(1), { + timeout: 20_000, + }); + expect(rejections.reasons[0]).toBeInstanceOf(Error); + expect((rejections.reasons[0] as Error).message).toContain( + '检查登录状态超时', ); // 启动检查失败在改动前就会显示原因 + 重试按钮;上报是叠加的,不是替换。 expect(