Added /mcp command support and cleaned up broken tests (#817)

This commit is contained in:
Bryan Morgan
2025-06-07 15:06:18 -04:00
committed by GitHub
parent 6ea4479064
commit 28ff62e7b1
9 changed files with 449 additions and 33 deletions

View File

@@ -185,7 +185,9 @@ describe('GlobTool', () => {
});
it('should return error if pattern is missing (schema validation)', () => {
const params = { path: '.' } as unknown as GlobToolParams;
// Need to correctly define this as an object without pattern
const params = { path: '.' };
// @ts-expect-error - We're intentionally creating invalid params for testing
expect(globTool.validateToolParams(params)).toContain(
'Parameters failed schema validation',
);
@@ -209,7 +211,8 @@ describe('GlobTool', () => {
const params = {
pattern: '*.ts',
path: 123,
} as unknown as GlobToolParams;
};
// @ts-expect-error - We're intentionally creating invalid params for testing
expect(globTool.validateToolParams(params)).toContain(
'Parameters failed schema validation',
);
@@ -219,7 +222,8 @@ describe('GlobTool', () => {
const params = {
pattern: '*.ts',
case_sensitive: 'true',
} as unknown as GlobToolParams;
};
// @ts-expect-error - We're intentionally creating invalid params for testing
expect(globTool.validateToolParams(params)).toContain(
'Parameters failed schema validation',
);