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:
Niels Kaspers
2026-02-06 22:59:19 +02:00
parent 9c0921276c
commit 0ca9921e20
5 changed files with 33 additions and 348 deletions

View File

@@ -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 () => {