@@ -6,34 +6,34 @@ import {
6
6
getChainIdByDIDsParts
7
7
} from '../../src' ;
8
8
9
- describe ( 'try to get already registred ' , ( ) => {
10
- it ( 'get by blokchain ' , async ( ) => {
11
- registerDefaultNetworkForMethodId ( 'eth' , 1 ) ;
9
+ describe ( 'try to get already registered ' , ( ) => {
10
+ it ( 'get by blockchain ' , async ( ) => {
11
+ expect ( getChainId ( 'eth' ) ) . to . be . equal ( 1 ) ;
12
12
} ) ;
13
- it ( 'get by blokchain and network' , async ( ) => {
14
- registerDefaultNetworkForMethodId ( 'polygon:mumbai' , 80001 ) ;
13
+ it ( 'get by blockchain and network' , async ( ) => {
14
+ expect ( getChainId ( 'polygon' , 'mumbai' ) ) . to . be . equal ( 80001 ) ;
15
15
} ) ;
16
16
} ) ;
17
17
18
18
describe ( 'get chainId by did parts' , ( ) => {
19
19
it ( 'register default chaiId' , async ( ) => {
20
- registerDefaultNetworkForMethodId ( 'dima ' , 12 ) ;
20
+ registerDefaultNetworkForMethodId ( 'testMethodId ' , 12 ) ;
21
21
} ) ;
22
22
it ( 'register blockchain' , async ( ) => {
23
- registerChainId ( 'kolez ' , 13 , 'zagreb ' ) ;
23
+ registerChainId ( 'testChain ' , 13 , 'testNetwork ' ) ;
24
24
} ) ;
25
25
it ( 'get default chainId by method did' , ( ) => {
26
- expect ( getChainIdByDIDsParts ( 'dima ' ) ) . to . be . equal ( 12 ) ;
26
+ expect ( getChainIdByDIDsParts ( 'testMethodId ' ) ) . to . be . equal ( 12 ) ;
27
27
} ) ;
28
28
it ( 'get chaiId by chainId and network' , ( ) => {
29
- expect ( getChainIdByDIDsParts ( 'dima ' , 'kolez ' , 'zagreb ' ) ) . to . be . equal ( 13 ) ;
29
+ expect ( getChainIdByDIDsParts ( 'testMethodIds ' , 'testChain ' , 'testNetwork ' ) ) . to . be . equal ( 13 ) ;
30
30
} ) ;
31
31
} ) ;
32
32
33
- describe ( 'try to get non registred chain id' , ( ) => {
34
- it ( 'try to get non registred by methodId ' , async ( ) => {
33
+ describe ( 'try to get non registered chain id' , ( ) => {
34
+ it ( 'try to get non registered by blockchain ' , async ( ) => {
35
35
expect ( ( ) => {
36
- getChainId ( 'ukr ' ) ;
37
- } ) . to . be . throw ( 'chainId not found for ukr ' ) ;
36
+ getChainId ( 'testChain2 ' ) ;
37
+ } ) . to . be . throw ( 'chainId not found for testChain2 ' ) ;
38
38
} ) ;
39
39
} ) ;
0 commit comments