@@ -65,14 +65,12 @@ describe('SetController', () => {
6565 // Instantiate SetController with incorrect security symbol
6666 target = new SetController ( params , contextMock . getMockInstance ( ) ) ;
6767
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 ( ) ;
7472
75- expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
73+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
7674 new PolymathError ( {
7775 code : ErrorCode . ProcedureValidationError ,
7876 message : `There is no Security Token with symbol ${ params . symbol } ` ,
@@ -91,7 +89,7 @@ describe('SetController', () => {
9189 ) ;
9290
9391 // Real call rejects
94- expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
92+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
9593 new PolymathError ( {
9694 code : ErrorCode . ProcedureValidationError ,
9795 message : `Controller address "Inappropriate" is invalid.` ,
@@ -110,7 +108,7 @@ describe('SetController', () => {
110108 target = new SetController ( params , contextMock . getMockInstance ( ) ) ;
111109
112110 // Real call rejects
113- expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
111+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
114112 new PolymathError ( {
115113 code : ErrorCode . ProcedureValidationError ,
116114 message : `You must be the owner of this Security Token to set the controller` ,
@@ -133,7 +131,7 @@ describe('SetController', () => {
133131 await target . prepareTransactions ( ) ;
134132
135133 // Verifications
136- expect (
134+ await expect (
137135 addTransactionSpy
138136 . getCall ( 0 )
139137 . calledWithExactly (
0 commit comments