@@ -65,14 +65,12 @@ describe('SetController', () => {
65
65
// Instantiate SetController with incorrect security symbol
66
66
target = new SetController ( params , contextMock . getMockInstance ( ) ) ;
67
67
68
- tokenFactoryMock . set (
69
- 'getSecurityTokenInstanceFromTicker' ,
70
- stub ( )
71
- . withArgs ( { address : params . symbol } )
72
- . throws ( )
73
- ) ;
68
+ tokenFactoryMock
69
+ . mock ( 'getSecurityTokenInstanceFromTicker' )
70
+ . withArgs ( params . symbol )
71
+ . throws ( ) ;
74
72
75
- expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
73
+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
76
74
new PolymathError ( {
77
75
code : ErrorCode . ProcedureValidationError ,
78
76
message : `There is no Security Token with symbol ${ params . symbol } ` ,
@@ -91,7 +89,7 @@ describe('SetController', () => {
91
89
) ;
92
90
93
91
// Real call rejects
94
- expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
92
+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
95
93
new PolymathError ( {
96
94
code : ErrorCode . ProcedureValidationError ,
97
95
message : `Controller address "Inappropriate" is invalid.` ,
@@ -110,7 +108,7 @@ describe('SetController', () => {
110
108
target = new SetController ( params , contextMock . getMockInstance ( ) ) ;
111
109
112
110
// Real call rejects
113
- expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
111
+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
114
112
new PolymathError ( {
115
113
code : ErrorCode . ProcedureValidationError ,
116
114
message : `You must be the owner of this Security Token to set the controller` ,
@@ -133,7 +131,7 @@ describe('SetController', () => {
133
131
await target . prepareTransactions ( ) ;
134
132
135
133
// Verifications
136
- expect (
134
+ await expect (
137
135
addTransactionSpy
138
136
. getCall ( 0 )
139
137
. calledWithExactly (
0 commit comments