Skip to content

test(web): harden managed state connect gates#1470

Open
go165 wants to merge 1 commit into
modelcontextprotocol:v2/mainfrom
go165:go165/v2-harden-managed-state-connect-tests
Open

test(web): harden managed state connect gates#1470
go165 wants to merge 1 commit into
modelcontextprotocol:v2/mainfrom
go165:go165/v2-harden-managed-state-connect-tests

Conversation

@go165

@go165 go165 commented Jun 14, 2026

Copy link
Copy Markdown

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant