mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
Improve Function Call argument validation and typing (#2881)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
committed by
GitHub
parent
137ffec3f6
commit
4dab31f1c8
@@ -181,8 +181,8 @@ describe('GlobTool', () => {
|
||||
// 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',
|
||||
expect(globTool.validateToolParams(params)).toBe(
|
||||
`params must have required property 'pattern'`,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -206,8 +206,8 @@ describe('GlobTool', () => {
|
||||
path: 123,
|
||||
};
|
||||
// @ts-expect-error - We're intentionally creating invalid params for testing
|
||||
expect(globTool.validateToolParams(params)).toContain(
|
||||
'Parameters failed schema validation',
|
||||
expect(globTool.validateToolParams(params)).toBe(
|
||||
'params/path must be string',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -217,8 +217,8 @@ describe('GlobTool', () => {
|
||||
case_sensitive: 'true',
|
||||
};
|
||||
// @ts-expect-error - We're intentionally creating invalid params for testing
|
||||
expect(globTool.validateToolParams(params)).toContain(
|
||||
'Parameters failed schema validation',
|
||||
expect(globTool.validateToolParams(params)).toBe(
|
||||
'params/case_sensitive must be boolean',
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user