@@ -20,20 +20,20 @@ import { KeyGenerator } from '../../../src/core/format/KeyGenerator';
2020describe ( 'key generator' , ( ) => {
2121 describe ( 'generate key from string' , ( ) => {
2222 it ( 'throws if input is empty' , ( ) => {
23- expect ( ( ) => KeyGenerator . fromString ( '' ) ) . to . throw ( Error , 'Input must not be empty' ) ;
23+ expect ( ( ) => KeyGenerator . generateUInt64Key ( '' ) ) . to . throw ( Error , 'Input must not be empty' ) ;
2424 } )
2525 it ( 'returns UInt64' , ( ) => {
26- expect ( KeyGenerator . fromString ( 'a' ) ) . to . be . instanceOf ( UInt64 ) ;
26+ expect ( KeyGenerator . generateUInt64Key ( 'a' ) ) . to . be . instanceOf ( UInt64 ) ;
2727 } )
2828 it ( 'generates correct keys' , ( ) => {
29- expect ( KeyGenerator . fromString ( 'a' ) . toHex ( ) ) . to . equal ( '80084BF2FBA02475 ' ) ;
29+ expect ( KeyGenerator . generateUInt64Key ( 'a' ) . toHex ( ) ) . to . equal ( 'F524A0FBF24B0880 ' ) ;
3030 } )
3131 it ( 'generates keys deterministically' , ( ) => {
32- expect ( KeyGenerator . fromString ( 'abc' ) . toHex ( ) ) . to . equal ( '3A985DA74FE225B2 ' ) ;
33- expect ( KeyGenerator . fromString ( 'abc' ) . toHex ( ) ) . to . equal ( '3A985DA74FE225B2 ' ) ;
34- expect ( KeyGenerator . fromString ( 'def' ) . toHex ( ) ) . to . equal ( '8E0D8F672252ACB0 ' ) ;
35- expect ( KeyGenerator . fromString ( 'def' ) . toHex ( ) ) . to . equal ( '8E0D8F672252ACB0 ' ) ;
36- expect ( KeyGenerator . fromString ( 'abc' ) . toHex ( ) ) . to . equal ( '3A985DA74FE225B2 ' ) ;
32+ expect ( KeyGenerator . generateUInt64Key ( 'abc' ) . toHex ( ) ) . to . equal ( 'B225E24FA75D983A ' ) ;
33+ expect ( KeyGenerator . generateUInt64Key ( 'abc' ) . toHex ( ) ) . to . equal ( 'B225E24FA75D983A ' ) ;
34+ expect ( KeyGenerator . generateUInt64Key ( 'def' ) . toHex ( ) ) . to . equal ( 'B0AC5222678F0D8E ' ) ;
35+ expect ( KeyGenerator . generateUInt64Key ( 'def' ) . toHex ( ) ) . to . equal ( 'B0AC5222678F0D8E ' ) ;
36+ expect ( KeyGenerator . generateUInt64Key ( 'abc' ) . toHex ( ) ) . to . equal ( 'B225E24FA75D983A ' ) ;
3737 } )
3838 } )
3939} ) ;
0 commit comments