test: add ~134 tests for application services, gateway, and frontend - #135
Open
its-mash wants to merge 5 commits into
Open
test: add ~134 tests for application services, gateway, and frontend#135its-mash wants to merge 5 commits into
its-mash wants to merge 5 commits into
Conversation
…uninstall confirm - Headers from server definitions are now always applied as default_headers on the reqwest::Client regardless of auth strategy (OAuth, PAT, or no-auth) - If headers contain an Authorization header, OAuth is skipped entirely - If headers have no Authorization, they ride alongside OAuth tokens - Add build_default_headers() and build_http_client() helpers - Remove standalone connect_with_headers() in favor of orthogonal design - Add 19 unit tests for HttpTransport (requires_oauth, header building, connect routing logic, transport_type, description) - Remove broken confirm() dialog from server uninstall action Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
Cover critical gaps identified in test coverage analysis: - Application services (ServerAppService, SpaceAppService, ClientAppService, PermissionAppService) had zero test coverage — now 44 integration tests - Gateway unit tests for GatewayState, RateLimiter, and routing auth error detection — 27 inline tests - Gateway integration tests for AuthorizationService and SpaceResolverService — 11 tests with real SQLite repos - TypeScript tests for pure functions (getConnectButtonLabel, getServerAction), Zustand selectors, and React hooks (useDomainEvents, useSpaces, useServerManager) — 49 tests - EventBus edge cases (try_recv, emit_or_warn) — 3 tests Signed-off-by: Myko <myko@mcpmux.com> Signed-off-by: Mohammod Al Amin Ashik <maa.ashik00@gmail.com>
| it('null spaceId skips fetch', async () => { | ||
| mockListen.mockResolvedValue(vi.fn()); | ||
|
|
||
| const { result } = renderHook(() => |
its-mash
force-pushed
the
main
branch
2 times, most recently
from
July 15, 2026 01:36
04e4d51 to
9e481e7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ServerAppService,SpaceAppService,ClientAppService,PermissionAppService) — these had zero test coverageGatewayState,RateLimiter, routing auth error detection) as inline#[cfg(test)]modulesAuthorizationService,SpaceResolverService) using real SQLite + mock reposgetConnectButtonLabel,getServerAction), Zustand selectors (useActiveSpace,useViewSpace,useIsLoading), and React hooks (useDomainEvents,useSpaces,useServerManager)EventBusedge cases (try_recv,emit_or_warn)Test plan
cargo test --workspace --lib— all Rust unit tests passcargo test -p tests— all Rust integration tests passpnpm test:ts— all 212 TypeScript tests pass (49 new)cargo clippy --workspace -- -D warnings— zero warningspnpm validate— fmt, clippy, eslint, typecheck all pass