inspector icon indicating copy to clipboard operation
inspector copied to clipboard

test(web): harden managed state connect gates

Open go165 opened this issue 5 months ago • 0 comments

Summary

Fixes #1396.

Replaces fixed double microtask flushes in the five Managed*State capability-gate connect-path tests with vi.waitFor assertions, keeping the tests uniform and less coupled to the current async depth inside refresh().

Validation

  • npm test -- src/test/core/mcp/state/managedToolsState.test.ts src/test/core/mcp/state/managedPromptsState.test.ts src/test/core/mcp/state/managedResourcesState.test.ts src/test/core/mcp/state/managedResourceTemplatesState.test.ts src/test/core/mcp/state/managedRequestorTasksState.test.ts
  • ./clients/web/node_modules/.bin/prettier --check clients/web/src/test/core/mcp/state/managedToolsState.test.ts clients/web/src/test/core/mcp/state/managedPromptsState.test.ts clients/web/src/test/core/mcp/state/managedResourcesState.test.ts clients/web/src/test/core/mcp/state/managedResourceTemplatesState.test.ts clients/web/src/test/core/mcp/state/managedRequestorTasksState.test.ts
  • git diff --check

I did not run full npm run validate; this is a test-only change scoped to the five files from #1396.

go165 avatar Jun 14 '26 10:06 go165