From c66923c868cc044986f2e79bb79880da1d5b7b40 Mon Sep 17 00:00:00 2001 From: iliya Date: Tue, 28 Apr 2026 17:14:14 +0300 Subject: [PATCH] test(team): strengthen tmux decoupling checks --- test/main/services/team/TeamProvisioningService.test.ts | 1 + test/renderer/components/common/TokenUsageDisplay.test.ts | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/test/main/services/team/TeamProvisioningService.test.ts b/test/main/services/team/TeamProvisioningService.test.ts index 3ee73aa4..c52fd4f5 100644 --- a/test/main/services/team/TeamProvisioningService.test.ts +++ b/test/main/services/team/TeamProvisioningService.test.ts @@ -636,6 +636,7 @@ describe('TeamProvisioningService', () => { await svc.getTeamAgentRuntimeSnapshot('runtime-team'); expect(listTmuxPaneRuntimeInfoForCurrentPlatform).not.toHaveBeenCalled(); + expect(listTmuxPanePidsForCurrentPlatform).not.toHaveBeenCalled(); }); it('exposes providerBackendId from the live run request when available', async () => { diff --git a/test/renderer/components/common/TokenUsageDisplay.test.ts b/test/renderer/components/common/TokenUsageDisplay.test.ts index d92420c2..a0e6fc52 100644 --- a/test/renderer/components/common/TokenUsageDisplay.test.ts +++ b/test/renderer/components/common/TokenUsageDisplay.test.ts @@ -54,10 +54,6 @@ async function flushReact(): Promise { await Promise.resolve(); } -function withoutNumberGroupSeparators(value: string | null | undefined): string { - return (value ?? '').replace(/[\s,\u00a0\u202f]/g, ''); -} - describe('TokenUsageDisplay', () => { afterEach(() => { document.body.innerHTML = ''; @@ -93,8 +89,9 @@ describe('TokenUsageDisplay', () => { }); const popover = document.querySelector('[role="tooltip"]'); + const expectedTotalTokens = new Intl.NumberFormat().format(2250); expect(popover).toBeTruthy(); - expect(withoutNumberGroupSeparators(popover?.textContent)).toContain('2250'); + expect(popover?.textContent).toContain(expectedTotalTokens); expect(popover?.textContent).toContain('500 (25.0% of prompt input)'); expect(popover?.textContent).not.toContain('of context');