@@ -46,14 +46,27 @@ describe('Account', () => {
46
46
expect ( account . address ) . to . not . be . equal ( undefined ) ;
47
47
} ) ;
48
48
49
- it ( 'signData' , ( ) => {
50
- const account = Account . createFromPrivateKey (
51
- 'AB860ED1FE7C91C02F79C02225DAC708D7BD13369877C1F59E678CC587658C47' ,
52
- NetworkType . MIJIN_TEST ,
53
- ) ;
54
- const publicAccount = account . publicAccount ;
55
- const signed = account . signData ( 'catapult rocks!' ) ;
56
- expect ( publicAccount . verifySignature ( 'catapult rocks!' , signed ) )
57
- . to . be . true ;
49
+ describe ( 'signData' , ( ) => {
50
+ it ( 'utf-8' , ( ) => {
51
+ const account = Account . createFromPrivateKey (
52
+ 'AB860ED1FE7C91C02F79C02225DAC708D7BD13369877C1F59E678CC587658C47' ,
53
+ NetworkType . MIJIN_TEST ,
54
+ ) ;
55
+ const publicAccount = account . publicAccount ;
56
+ const signed = account . signData ( 'catapult rocks!' ) ;
57
+ expect ( publicAccount . verifySignature ( 'catapult rocks!' , signed ) )
58
+ . to . be . true ;
59
+ } ) ;
60
+
61
+ it ( 'hexa' , ( ) => {
62
+ const account = Account . createFromPrivateKey (
63
+ 'AB860ED1FE7C91C02F79C02225DAC708D7BD13369877C1F59E678CC587658C47' ,
64
+ NetworkType . MIJIN_TEST ,
65
+ ) ;
66
+ const publicAccount = account . publicAccount ;
67
+ const signed = account . signData ( '0xAA' ) ;
68
+ expect ( publicAccount . verifySignature ( '0xAA' , signed ) )
69
+ . to . be . true ;
70
+ } ) ;
58
71
} ) ;
59
72
} ) ;
0 commit comments