66 ALLOWED_CHARACTERS_ERROR ,
77 ALLOWED_REGION_CHARACTERS_ERROR ,
88 ALLOWED_CLUSTER_NAME_CHARACTERS_ERROR ,
9+ NO_UNICODE_ERROR ,
910} from "../../src/tools/args.js" ;
1011
1112describe ( "Tool args" , ( ) => {
@@ -28,22 +29,22 @@ describe("Tool args", () => {
2829 const schema = CommonArgs . string ( ) ;
2930
3031 // Unicode characters
31- expect ( ( ) => schema . parse ( "héllo" ) ) . toThrow ( ) ;
32- expect ( ( ) => schema . parse ( "测试" ) ) . toThrow ( ) ;
33- expect ( ( ) => schema . parse ( "café" ) ) . toThrow ( ) ;
32+ expect ( ( ) => schema . parse ( "héllo" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
33+ expect ( ( ) => schema . parse ( "测试" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
34+ expect ( ( ) => schema . parse ( "café" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
3435
3536 // Emojis
36- expect ( ( ) => schema . parse ( "🚀" ) ) . toThrow ( ) ;
37- expect ( ( ) => schema . parse ( "hello😀" ) ) . toThrow ( ) ;
37+ expect ( ( ) => schema . parse ( "🚀" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
38+ expect ( ( ) => schema . parse ( "hello😀" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
3839
3940 // Control characters (below ASCII 32)
40- expect ( ( ) => schema . parse ( "hello\nworld" ) ) . toThrow ( ) ;
41- expect ( ( ) => schema . parse ( "hello\tworld" ) ) . toThrow ( ) ;
42- expect ( ( ) => schema . parse ( "hello\0world" ) ) . toThrow ( ) ;
41+ expect ( ( ) => schema . parse ( "hello\nworld" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
42+ expect ( ( ) => schema . parse ( "hello\tworld" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
43+ expect ( ( ) => schema . parse ( "hello\0world" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
4344
4445 // Extended ASCII characters (above ASCII 126)
45- expect ( ( ) => schema . parse ( "hello\x80" ) ) . toThrow ( ) ;
46- expect ( ( ) => schema . parse ( "hello\xFF" ) ) . toThrow ( ) ;
46+ expect ( ( ) => schema . parse ( "hello\x80" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
47+ expect ( ( ) => schema . parse ( "hello\xFF" ) ) . toThrow ( NO_UNICODE_ERROR ) ;
4748 } ) ;
4849
4950 it ( "should reject non-string values" , ( ) => {
0 commit comments