@@ -54,18 +54,16 @@ describe("Tool args", () => {
5454 expect ( ( ) => schema . parse ( { } ) ) . toThrow ( ) ;
5555 } ) ;
5656 } ) ;
57- } ) ;
5857
59- describe ( "AtlasArgs" , ( ) => {
6058 describe ( "objectId" , ( ) => {
6159 it ( "should validate 24-character hexadecimal strings" , ( ) => {
62- const schema = AtlasArgs . objectId ( "Test ID" ) ;
60+ const schema = CommonArgs . objectId ( "Test ID" ) ;
6361 const validId = "507f1f77bcf86cd799439011" ;
6462 expect ( schema . parse ( validId ) ) . toBe ( validId ) ;
6563 } ) ;
6664
6765 it ( "should reject invalid ObjectId formats" , ( ) => {
68- const schema = AtlasArgs . objectId ( "Test ID" ) ;
66+ const schema = CommonArgs . objectId ( "Test ID" ) ;
6967
7068 // Too short
7169 expect ( ( ) => schema . parse ( "507f1f77bcf86cd79943901" ) ) . toThrow ( ) ;
@@ -82,21 +80,23 @@ describe("Tool args", () => {
8280 } ) ;
8381
8482 it ( "should provide custom field name in error messages" , ( ) => {
85- const schema = AtlasArgs . objectId ( "Custom Field" ) ;
83+ const schema = CommonArgs . objectId ( "Custom Field" ) ;
8684 expect ( ( ) => schema . parse ( "invalid" ) ) . toThrow ( "Custom Field must be exactly 24 characters" ) ;
8785 } ) ;
8886
8987 it ( "should not fail if the value is optional" , ( ) => {
90- const schema = AtlasArgs . objectId ( "Custom Field" ) . optional ( ) ;
88+ const schema = CommonArgs . objectId ( "Custom Field" ) . optional ( ) ;
9189 expect ( schema . parse ( undefined ) ) . toBeUndefined ( ) ;
9290 } ) ;
9391
9492 it ( "should not fail if the value is empty" , ( ) => {
95- const schema = AtlasArgs . objectId ( "Custom Field" ) ;
93+ const schema = CommonArgs . objectId ( "Custom Field" ) ;
9694 expect ( ( ) => schema . parse ( undefined ) ) . toThrow ( "Required" ) ;
9795 } ) ;
9896 } ) ;
97+ } ) ;
9998
99+ describe ( "AtlasArgs" , ( ) => {
100100 describe ( "projectId" , ( ) => {
101101 it ( "should validate project IDs" , ( ) => {
102102 const schema = AtlasArgs . projectId ( ) ;
0 commit comments