@@ -14,7 +14,7 @@ import {
14
14
afterEach ,
15
15
Mocked ,
16
16
} from 'vitest' ;
17
- import { discoverMcpTools , sanatizeParameters } from './mcp-client.js' ;
17
+ import { discoverMcpTools , sanitizeParameters } from './mcp-client.js' ;
18
18
import { Schema , Type } from '@google/genai' ;
19
19
import { Config , MCPServerConfig } from '../config/config.js' ;
20
20
import { DiscoveredMCPTool } from './mcp-tool.js' ;
@@ -538,22 +538,22 @@ describe('discoverMcpTools', () => {
538
538
} ) ;
539
539
} ) ;
540
540
541
- describe ( 'sanatizeParameters ' , ( ) => {
541
+ describe ( 'sanitizeParameters ' , ( ) => {
542
542
it ( 'should do nothing for an undefined schema' , ( ) => {
543
543
const schema = undefined ;
544
- sanatizeParameters ( schema ) ;
544
+ sanitizeParameters ( schema ) ;
545
545
} ) ;
546
546
547
547
it ( 'should remove default when anyOf is present' , ( ) => {
548
548
const schema : Schema = {
549
549
anyOf : [ { type : Type . STRING } , { type : Type . NUMBER } ] ,
550
550
default : 'hello' ,
551
551
} ;
552
- sanatizeParameters ( schema ) ;
552
+ sanitizeParameters ( schema ) ;
553
553
expect ( schema . default ) . toBeUndefined ( ) ;
554
554
} ) ;
555
555
556
- it ( 'should recursively sanatize items in anyOf' , ( ) => {
556
+ it ( 'should recursively sanitize items in anyOf' , ( ) => {
557
557
const schema : Schema = {
558
558
anyOf : [
559
559
{
@@ -563,22 +563,22 @@ describe('sanatizeParameters', () => {
563
563
{ type : Type . NUMBER } ,
564
564
] ,
565
565
} ;
566
- sanatizeParameters ( schema ) ;
566
+ sanitizeParameters ( schema ) ;
567
567
expect ( schema . anyOf ! [ 0 ] . default ) . toBeUndefined ( ) ;
568
568
} ) ;
569
569
570
- it ( 'should recursively sanatize items in items' , ( ) => {
570
+ it ( 'should recursively sanitize items in items' , ( ) => {
571
571
const schema : Schema = {
572
572
items : {
573
573
anyOf : [ { type : Type . STRING } ] ,
574
574
default : 'world' ,
575
575
} ,
576
576
} ;
577
- sanatizeParameters ( schema ) ;
577
+ sanitizeParameters ( schema ) ;
578
578
expect ( schema . items ! . default ) . toBeUndefined ( ) ;
579
579
} ) ;
580
580
581
- it ( 'should recursively sanatize items in properties' , ( ) => {
581
+ it ( 'should recursively sanitize items in properties' , ( ) => {
582
582
const schema : Schema = {
583
583
properties : {
584
584
prop1 : {
@@ -587,7 +587,7 @@ describe('sanatizeParameters', () => {
587
587
} ,
588
588
} ,
589
589
} ;
590
- sanatizeParameters ( schema ) ;
590
+ sanitizeParameters ( schema ) ;
591
591
expect ( schema . properties ! . prop1 . default ) . toBeUndefined ( ) ;
592
592
} ) ;
593
593
@@ -614,7 +614,7 @@ describe('sanatizeParameters', () => {
614
614
} ,
615
615
} ,
616
616
} ;
617
- sanatizeParameters ( schema ) ;
617
+ sanitizeParameters ( schema ) ;
618
618
expect ( schema . properties ! . prop1 . items ! . default ) . toBeUndefined ( ) ;
619
619
const nestedProp =
620
620
schema . properties ! . prop2 . anyOf ! [ 0 ] . properties ! . nestedProp ;
0 commit comments