Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
test: classify additional hygiene fixtures
MagicLizi3441f520b803
diff --git a/apps/desktop/src/main/model-access/__tests__/quotaCredentialState.test.ts b/apps/desktop/src/main/model-access/__tests__/quotaCredentialState.test.tsindex 7dc31b0491..b9c5b3b721 100644--- a/apps/desktop/src/main/model-access/__tests__/quotaCredentialState.test.ts+++ b/apps/desktop/src/main/model-access/__tests__/quotaCredentialState.test.ts@@ -1,4 +1,5 @@import { beforeEach, expect, it, vi } from 'vitest';+// reset-modules: each case must observe a fresh in-process credential status store.beforeEach(() => vi.resetModules());const status = { state: 'ok', source: 'server', endpoint: 'https://gateway.example.test', accountTier: null } as const;it('requires a successful current-process sync and matches both owner and endpoint', async () => {diff --git a/apps/desktop/src/main/usage/__tests__/claudeAccountUsageKeyRejection.test.ts b/apps/desktop/src/main/usage/__tests__/claudeAccountUsageKeyRejection.test.tsindex 4f51eb3ed5..b797086963 100644--- a/apps/desktop/src/main/usage/__tests__/claudeAccountUsageKeyRejection.test.ts+++ b/apps/desktop/src/main/usage/__tests__/claudeAccountUsageKeyRejection.test.ts@@ -47,6 +47,7 @@ function jsonResponse(body: unknown, status = 200): Response {describe('claudeAccountUsage Cindy AI key rejection', () => {beforeEach(async () => {+ // reset-modules: reset the quota credential singleton before rebuilding the mocked account state.vi.resetModules();vi.useFakeTimers();mocks.outboundFetch.mockReset();diff --git a/apps/desktop/src/main/usage/__tests__/organizationQuotaRefresh.test.ts b/apps/desktop/src/main/usage/__tests__/organizationQuotaRefresh.test.tsindex a78ec0f073..b471540845 100644--- a/apps/desktop/src/main/usage/__tests__/organizationQuotaRefresh.test.ts+++ b/apps/desktop/src/main/usage/__tests__/organizationQuotaRefresh.test.ts@@ -16,6 +16,7 @@ vi.mock('../ledgerCurrency', () => ({ currentLedgerCurrency: () => 'CNY' }));vi.mock('../organizationAccountUsage.js', () => ({ readOrganizationAccountUsage: mocks.managed }));const quota = { spend: 12, maxBudget: 100, currency: 'CNY', todaySpend: null, fetchedAt: 1 };beforeEach(async () => {+ // reset-modules: each refresh scenario starts with a new quota credential singleton.vi.resetModules(); vi.useFakeTimers(); vi.clearAllMocks();mocks.auth = { mode: 'cloud', ownerGeneration: 1, dataOwnerId: 'owner-a', user: { id: 'member-a', membershipKind: 'org' } };mocks.endpoint = 'https://gateway.example.test';diff --git a/scripts/test-workspaces.config.mjs b/scripts/test-workspaces.config.mjsindex 5eac852f18..ca13f5db29 100644--- a/scripts/test-workspaces.config.mjs+++ b/scripts/test-workspaces.config.mjs@@ -111,6 +111,7 @@ const desktopGuardInclude = [// the full device-link singleton would start Electron runtime wiring. Keep it in the explicit// guard tier rather than letting its source extraction enter ordinary unit tests.'src/main/mcp-apps/__tests__/remoteViews.test.ts',+ 'src/renderer/features/cc-agent/sidebar/__tests__/sessionCardReviewRegressions.test.ts','src/main/cindy-brain/__tests__/forgeOidcInstallEntry.test.ts','src/main/cindy-brain/__tests__/ghostDevRuntimeContract.test.ts','src/main/cindy-brain/__tests__/ghostIpcMutationLease.test.ts',