Skip to content

test: add tests and test tooling for MCP-UI #902

test: add tests and test tooling for MCP-UI

test: add tests and test tooling for MCP-UI #902

Triggered via pull request December 11, 2025 14:58
@tscktsck
synchronize #787
tests/mcp-ui
Status Failure
Total duration 5m 16s
Artifacts 6

code-health.yml

on: pull_request
Matrix: Run MongoDB tests
Run Atlas tests
2m 50s
Run Atlas tests
Run Atlas Local tests
3m 9s
Run Atlas Local tests
Run git secrets
2m 6s
Run git secrets
Report Coverage
35s
Report Coverage
Fit to window
Zoom out
Zoom in

Annotations

31 errors and 1 warning
tests/unit/ui/registry/registry.test.ts > UIRegistry > get() > should return custom UI when set, overriding bundled UI: tests/unit/ui/registry/registry.test.ts#L24
AssertionError: expected Promise{…} to be '<html>custom list-databases UI</html>' // Object.is equality - Expected: "<html>custom list-databases UI</html>" + Received: Promise {} ❯ tests/unit/ui/registry/registry.test.ts:24:52
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should merge custom UIs with bundled UIs: tests/integration/ui/mcpUIFeature.test.ts#L258
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:258:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should add new custom UIs for tools without bundled UIs: tests/integration/ui/mcpUIFeature.test.ts#L244
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:244:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should use custom UI when provided via server options: tests/integration/ui/mcpUIFeature.test.ts#L231
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:231:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature - UIRegistry initialization > server UIRegistry > should return list of available tools with UIs: tests/integration/ui/mcpUIFeature.test.ts#L157
TypeError: server.uiRegistry.getAvailableTools is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:157:58
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with feature enabled > list-databases tool with mcpUI enabled > should include system databases in the response: tests/integration/helpers.ts#L321
AssertionError: expected undefined to be defined ❯ expectDefined tests/integration/helpers.ts:321:17 ❯ tests/integration/ui/mcpUIFeature.test.ts:119:17
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with feature enabled > list-databases tool with mcpUI enabled > should return UIResource content when mcpUI feature is enabled: tests/integration/ui/mcpUIFeature.test.ts#L71
AssertionError: expected [] to have a length of 1 but got +0 - Expected + Received - 1 + 0 ❯ tests/integration/ui/mcpUIFeature.test.ts:71:42
tests/unit/toolBase.test.ts > ToolBase > appendUIResource > should append UIResource correctly when all conditions are met: tests/unit/toolBase.test.ts#L423
AssertionError: expected 'ui://test-tool-with-output-schema' to match /^ui:\/\/test-tool-with-output-schema…/\ - Expected: /^ui:\/\/test-tool-with-output-schema\/\d+$/ + Received: "ui://test-tool-with-output-schema" ❯ tests/unit/toolBase.test.ts:423:45
tests/unit/toolBase.test.ts > ToolBase > appendUIResource > should not append UIResource when outputSchema validation fails: tests/unit/toolBase.test.ts#L404
AssertionError: expected [ { type: 'text', …(1) }, …(1) ] to have a length of 1 but got 2 - Expected + Received - 1 + 2 ❯ tests/unit/toolBase.test.ts:404:36
tests/unit/ui/registry/registry.test.ts > UIRegistry > get() > should return custom UI when set, overriding bundled UI: tests/unit/ui/registry/registry.test.ts#L24
AssertionError: expected Promise{…} to be '<html>custom list-databases UI</html>' // Object.is equality - Expected: "<html>custom list-databases UI</html>" + Received: Promise {} ❯ tests/unit/ui/registry/registry.test.ts:24:52
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should merge custom UIs with bundled UIs: tests/integration/ui/mcpUIFeature.test.ts#L258
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:258:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should add new custom UIs for tools without bundled UIs: tests/integration/ui/mcpUIFeature.test.ts#L244
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:244:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should use custom UI when provided via server options: tests/integration/ui/mcpUIFeature.test.ts#L231
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:231:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature - UIRegistry initialization > server UIRegistry > should return list of available tools with UIs: tests/integration/ui/mcpUIFeature.test.ts#L157
TypeError: server.uiRegistry.getAvailableTools is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:157:58
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with feature enabled > list-databases tool with mcpUI enabled > should include system databases in the response: tests/integration/helpers.ts#L321
AssertionError: expected undefined to be defined ❯ expectDefined tests/integration/helpers.ts:321:17 ❯ tests/integration/ui/mcpUIFeature.test.ts:119:17
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with feature enabled > list-databases tool with mcpUI enabled > should return UIResource content when mcpUI feature is enabled: tests/integration/ui/mcpUIFeature.test.ts#L71
AssertionError: expected [] to have a length of 1 but got +0 - Expected + Received - 1 + 0 ❯ tests/integration/ui/mcpUIFeature.test.ts:71:42
tests/unit/toolBase.test.ts > ToolBase > appendUIResource > should append UIResource correctly when all conditions are met: tests/unit/toolBase.test.ts#L423
AssertionError: expected 'ui://test-tool-with-output-schema' to match /^ui:\/\/test-tool-with-output-schema…/\ - Expected: /^ui:\/\/test-tool-with-output-schema\/\d+$/ + Received: "ui://test-tool-with-output-schema" ❯ tests/unit/toolBase.test.ts:423:45
tests/unit/toolBase.test.ts > ToolBase > appendUIResource > should not append UIResource when outputSchema validation fails: tests/unit/toolBase.test.ts#L404
AssertionError: expected [ { type: 'text', …(1) }, …(1) ] to have a length of 1 but got 2 - Expected + Received - 1 + 2 ❯ tests/unit/toolBase.test.ts:404:36
tests/unit/ui/registry/registry.test.ts > UIRegistry > get() > should return custom UI when set, overriding bundled UI: tests/unit/ui/registry/registry.test.ts#L24
AssertionError: expected Promise{…} to be '<html>custom list-databases UI</html>' // Object.is equality - Expected: "<html>custom list-databases UI</html>" + Received: Promise {} ❯ tests/unit/ui/registry/registry.test.ts:24:52
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should merge custom UIs with bundled UIs: tests/integration/ui/mcpUIFeature.test.ts#L258
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:258:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should add new custom UIs for tools without bundled UIs: tests/integration/ui/mcpUIFeature.test.ts#L244
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:244:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with custom UIs > should use custom UI when provided via server options: tests/integration/ui/mcpUIFeature.test.ts#L231
TypeError: server.uiRegistry.has is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:231:34
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature - UIRegistry initialization > server UIRegistry > should return list of available tools with UIs: tests/integration/ui/mcpUIFeature.test.ts#L157
TypeError: server.uiRegistry.getAvailableTools is not a function ❯ tests/integration/ui/mcpUIFeature.test.ts:157:58
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with feature enabled > list-databases tool with mcpUI enabled > should include system databases in the response: tests/integration/helpers.ts#L321
AssertionError: expected undefined to be defined ❯ expectDefined tests/integration/helpers.ts:321:17 ❯ tests/integration/ui/mcpUIFeature.test.ts:119:17
tests/integration/ui/mcpUIFeature.test.ts > mcpUI feature with feature enabled > list-databases tool with mcpUI enabled > should return UIResource content when mcpUI feature is enabled: tests/integration/ui/mcpUIFeature.test.ts#L71
AssertionError: expected [] to have a length of 1 but got +0 - Expected + Received - 1 + 0 ❯ tests/integration/ui/mcpUIFeature.test.ts:71:42
tests/unit/toolBase.test.ts > ToolBase > appendUIResource > should append UIResource correctly when all conditions are met: tests/unit/toolBase.test.ts#L423
AssertionError: expected 'ui://test-tool-with-output-schema' to match /^ui:\/\/test-tool-with-output-schema…/\ - Expected: /^ui:\/\/test-tool-with-output-schema\/\d+$/ + Received: "ui://test-tool-with-output-schema" ❯ tests/unit/toolBase.test.ts:423:45
tests/unit/toolBase.test.ts > ToolBase > appendUIResource > should not append UIResource when outputSchema validation fails: tests/unit/toolBase.test.ts#L404
AssertionError: expected [ { type: 'text', …(1) }, …(1) ] to have a length of 1 but got 2 - Expected + Received - 1 + 2 ❯ tests/unit/toolBase.test.ts:404:36
Report Coverage
Unable to download artifact(s): Artifact not found for name: test-results Please ensure that your artifact is not expired and the artifact was uploaded using a compatible version of toolkit/upload-artifact. For more information, visit the GitHub Artifacts FAQ: https://github.com/actions/toolkit/blob/main/packages/artifact/docs/faq.md
Run MongoDB tests (ubuntu-latest)
No files were found with the provided path: coverage/lcov.info. No artifacts will be uploaded.

Artifacts

Produced during runtime
Name Size Digest
atlas-local-test-results
19.3 KB
sha256:7b581440730fbbe626af4d3d2552bb711829e2ed28ef822f78a60ce49d25e1f8
atlas-test-results
20.9 KB
sha256:1a81bf95269c2c964d91c9382326a79e45b48a60bf89ac997cc1c1f11eb4df24
run-atlas-local-tests-permissions-c471c5aedf4fd86a27bfc796cd6ba39d
140 Bytes
sha256:da67fd6cef984cc57c7a95374803644bea967bfcf7df3b54dd40c1f63182cd6f
run-atlas-tests-permissions-ae49c37df9f57056ffe75bb525b320fb
140 Bytes
sha256:a0fcc3f69ca0f5ca7316fa79d6f9b3d3d38644ee5f43fa4a8fcb6793c4cce238
run-git-secrets-permissions-0256301a850b8cab100a9a78523dd8e4
140 Bytes
sha256:4b50fa356d7e71ebbb69ecb4650584b0266900830ccdbb22209073f138465f2a
run-tests-permissions-2d46c6298f4931226e416778fcaa7e8f
140 Bytes
sha256:98b8bdb5a50e50a4ffa4420c7d1aef9f18b73824dc4b8f53fbdb370dfc5822cc