File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -493,16 +493,16 @@ describe("Aiken CBOR Encoding Compatibility", () => {
493493
494494 // Test #56: encode_string_ascii
495495 it ( "encode_string_ascii: should encode 'hello' as bytearray" , ( ) => {
496- const value = Text . toBytesUnsafe ( "hello" )
496+ const value = Text . toBytes ( "hello" )
497497 const encoded = Data . toCBORHex ( value , CBOR . AIKEN_DEFAULT_OPTIONS )
498498 expect ( encoded ) . toBe ( "4568656c6c6f" )
499499 } )
500500
501501 // Test #57: encode_string_unicode
502502 it ( "encode_string_unicode: should encode 'café' as bytearray" , ( ) => {
503- const value = Text . toBytesUnsafe ( "café" )
503+ const value = Text . toBytes ( "café" )
504504 const encoded = Data . toCBORHex ( value , CBOR . AIKEN_DEFAULT_OPTIONS )
505- expect ( encoded ) . toBe ( "45636166c3a9" )
505+ expect ( encoded ) . toBe ( "45636166c3a9" ) // UTF-8 encoding of "café"
506506 } )
507507
508508 // Test #58: encode_bool_true
You can’t perform that action at this time.
0 commit comments