mirror of
https://github.com/modelcontextprotocol/servers.git
synced 2026-04-17 23:53:24 +02:00
Trim low-value tests per review feedback
Removed ~29 tests that were adding noise rather than coverage: - Registration boilerplate tests (16): redundant with registrations.test.ts - Redundant role/type checks (3): consolidated into behavioral tests - "Should not throw" tests (6): consolidated into single lifecycle test - Constant identity tests (2): provided no safety net - expect(true).toBe(true) test (1): replaced with actual assertion - Weak capability test (1): removed, handler check already exists Strengthened remaining tests: - Resource templates test now verifies specific resource names - File resources test now asserts registerResource was called Test count: 124 → 95 (29 removed) Coverage unchanged at ~71% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -117,8 +117,13 @@ describe('Registration Index Files', () => {
|
||||
|
||||
registerResources(mockServer);
|
||||
|
||||
// Should register at least the 2 resource templates (text and blob)
|
||||
// Should register at least the 2 resource templates (text and blob) plus file resources
|
||||
expect(mockServer.registerResource).toHaveBeenCalled();
|
||||
const registeredResources = (mockServer.registerResource as any).mock.calls.map(
|
||||
(call: any[]) => call[0]
|
||||
);
|
||||
expect(registeredResources).toContain('Dynamic Text Resource');
|
||||
expect(registeredResources).toContain('Dynamic Blob Resource');
|
||||
});
|
||||
|
||||
it('should read instructions from file', async () => {
|
||||
|
||||
Reference in New Issue
Block a user