1
1
import { MakerVaultType } from 'blockchain/calls/vaultResolver'
2
- import { expect } from 'chai'
3
2
import { getStateUnpacker } from 'helpers/testHelpers'
4
3
5
4
import { ProxyActionsAdapterType } from './adapters/ProxyActionsSmartContractAdapterInterface'
@@ -12,21 +11,21 @@ describe('proxyActionsAdapterResolver', () => {
12
11
13
12
const state = getStateUnpacker ( adapter$ )
14
13
15
- expect ( state ( ) . AdapterType ) . to . eq ( ProxyActionsAdapterType . CROPJOIN )
14
+ expect ( state ( ) . AdapterType ) . toBe ( ProxyActionsAdapterType . CROPJOIN )
16
15
} )
17
16
it ( 'returns default proxy actions for other ilks' , ( ) => {
18
17
const adapter$ = proxyActionsAdapterResolver$ ( { ilk : 'ETH-A' } )
19
18
20
19
const state = getStateUnpacker ( adapter$ )
21
20
22
- expect ( state ( ) . AdapterType ) . to . eq ( ProxyActionsAdapterType . STANDARD )
21
+ expect ( state ( ) . AdapterType ) . toBe ( ProxyActionsAdapterType . STANDARD )
23
22
} )
24
23
it ( 'throws when trying to open a charter vault' , ( ) => {
25
24
const adapter$ = proxyActionsAdapterResolver$ ( { ilk : 'INST-ETH-A' } )
26
25
27
26
const state = getStateUnpacker ( adapter$ )
28
27
29
- expect ( state ) . to . throw (
28
+ expect ( state ) . toThrow (
30
29
'can not create a proxy actions adapter from an INST-ETH-A ilk - adapter is not tested for opening vaults' ,
31
30
)
32
31
} )
@@ -38,21 +37,21 @@ describe('proxyActionsAdapterResolver', () => {
38
37
39
38
const state = getStateUnpacker ( adapter$ )
40
39
41
- expect ( state ( ) . AdapterType ) . to . eq ( ProxyActionsAdapterType . CROPJOIN )
40
+ expect ( state ( ) . AdapterType ) . toBe ( ProxyActionsAdapterType . CROPJOIN )
42
41
} )
43
42
it ( 'returns CHARTER proxy actions for CHARTER vault type' , ( ) => {
44
43
const adapter$ = proxyActionsAdapterResolver$ ( { makerVaultType : MakerVaultType . CHARTER } )
45
44
46
45
const state = getStateUnpacker ( adapter$ )
47
46
48
- expect ( state ( ) . AdapterType ) . to . eq ( ProxyActionsAdapterType . CHARTER )
47
+ expect ( state ( ) . AdapterType ) . toBe ( ProxyActionsAdapterType . CHARTER )
49
48
} )
50
49
it ( 'returns standard proxy actions in all other cases' , ( ) => {
51
50
const adapter$ = proxyActionsAdapterResolver$ ( { makerVaultType : MakerVaultType . STANDARD } )
52
51
53
52
const state = getStateUnpacker ( adapter$ )
54
53
55
- expect ( state ( ) . AdapterType ) . to . eq ( ProxyActionsAdapterType . STANDARD )
54
+ expect ( state ( ) . AdapterType ) . toBe ( ProxyActionsAdapterType . STANDARD )
56
55
} )
57
56
} )
58
57
} )
0 commit comments