@@ -104,14 +104,12 @@ describe('SetDividendsWallet', () => {
104104 contextMock . getMockInstance ( )
105105 ) ;
106106
107- tokenFactoryMock . set (
108- 'getSecurityTokenInstanceFromTicker' ,
109- stub ( )
110- . withArgs ( { address : params . symbol } )
111- . throws ( )
112- ) ;
107+ tokenFactoryMock
108+ . mock ( 'getSecurityTokenInstanceFromTicker' )
109+ . withArgs ( params . symbol )
110+ . throws ( ) ;
113111
114- expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
112+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
115113 new PolymathError ( {
116114 code : ErrorCode . ProcedureValidationError ,
117115 message : `There is no Security Token with symbol ${ params . symbol } ` ,
@@ -126,7 +124,7 @@ describe('SetDividendsWallet', () => {
126124 contextMock . getMockInstance ( )
127125 ) ;
128126
129- expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
127+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrow (
130128 new PolymathError ( {
131129 code : ErrorCode . ProcedureValidationError ,
132130 message : "Dividends of the specified type haven't been enabled" ,
@@ -143,7 +141,7 @@ describe('SetDividendsWallet', () => {
143141 wrappersMock . mock ( 'getAttachedModules' , Promise . resolve ( [ ] ) ) ;
144142
145143 // Real call
146- expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
144+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
147145 new PolymathError ( {
148146 code : ErrorCode . ProcedureValidationError ,
149147 message : "Dividends of the specified type haven't been enabled" ,
@@ -160,7 +158,7 @@ describe('SetDividendsWallet', () => {
160158 wrappersMock . mock ( 'getAttachedModules' , Promise . resolve ( [ ] ) ) ;
161159
162160 // Real call
163- expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
161+ await expect ( target . prepareTransactions ( ) ) . rejects . toThrowError (
164162 new PolymathError ( {
165163 code : ErrorCode . ProcedureValidationError ,
166164 message : "Dividends of the specified type haven't been enabled" ,
@@ -233,11 +231,13 @@ describe('SetDividendsWallet', () => {
233231 'refresh' ,
234232 Promise . resolve ( undefined )
235233 ) ;
236- const resolverValue = setDividendsWalletModule . createSetDividendWalletResolver (
234+
235+ const resolverValue = await setDividendsWalletModule . createSetDividendsWalletResolver (
237236 DividendType . Erc20 ,
238237 factoriesMockedSetup ,
239238 params . symbol
240239 ) ( ) ;
240+
241241 expect (
242242 refreshStub . getCall ( 0 ) . calledWithExactly (
243243 Erc20DividendsManager . generateId ( {
@@ -258,11 +258,13 @@ describe('SetDividendsWallet', () => {
258258 'refresh' ,
259259 Promise . resolve ( undefined )
260260 ) ;
261- const resolverValue = setDividendsWalletModule . createSetDividendWalletResolver (
261+
262+ const resolverValue = await setDividendsWalletModule . createSetDividendsWalletResolver (
262263 DividendType . Eth ,
263264 factoriesMockedSetup ,
264265 params . symbol
265266 ) ( ) ;
267+
266268 expect (
267269 refreshStub . getCall ( 0 ) . calledWithExactly (
268270 EthDividendsManager . generateId ( {
0 commit comments