First batch of fixing tests to use best practices. (#11964)

This commit is contained in:
Jacob Richman
2025-10-25 14:41:53 -07:00
committed by GitHub
parent 8352980f01
commit ee66732ad2
48 changed files with 1128 additions and 1113 deletions
@@ -67,8 +67,7 @@ describe('SubagentToolWrapper', () => {
it('should call convertInputConfigToJsonSchema with the correct agent inputConfig', () => {
new SubagentToolWrapper(mockDefinition, mockConfig);
expect(convertInputConfigToJsonSchema).toHaveBeenCalledOnce();
expect(convertInputConfigToJsonSchema).toHaveBeenCalledWith(
expect(convertInputConfigToJsonSchema).toHaveBeenCalledExactlyOnceWith(
mockDefinition.inputConfig,
);
});
@@ -115,8 +114,7 @@ describe('SubagentToolWrapper', () => {
const invocation = wrapper.build(params);
expect(invocation).toBeInstanceOf(SubagentInvocation);
expect(MockedSubagentInvocation).toHaveBeenCalledOnce();
expect(MockedSubagentInvocation).toHaveBeenCalledWith(
expect(MockedSubagentInvocation).toHaveBeenCalledExactlyOnceWith(
params,
mockDefinition,
mockConfig,