@@ -30,6 +30,12 @@ const mockTransport = {
30
30
verifyEmail : jest . fn ( ( ) => Promise . resolve ( ) ) ,
31
31
sendVerificationEmail : jest . fn ( ( ) => Promise . resolve ( ) ) ,
32
32
impersonate : jest . fn ( ( ) => Promise . resolve ( impersonateResult ) ) ,
33
+ getUser : jest . fn ( ( ) => Promise . resolve ( ) ) ,
34
+ mfaChallenge : jest . fn ( ( ) => Promise . resolve ( ) ) ,
35
+ mfaAssociate : jest . fn ( ( ) => Promise . resolve ( ) ) ,
36
+ mfaAssociateByMfaToken : jest . fn ( ( ) => Promise . resolve ( ) ) ,
37
+ authenticators : jest . fn ( ( ) => Promise . resolve ( ) ) ,
38
+ authenticatorsByMfaToken : jest . fn ( ( ) => Promise . resolve ( ) ) ,
33
39
} ;
34
40
35
41
describe ( 'Accounts' , ( ) => {
@@ -270,4 +276,53 @@ describe('Accounts', () => {
270
276
expect ( userTokens ) . toEqual ( impersonateResult . tokens ) ;
271
277
} ) ;
272
278
} ) ;
279
+
280
+ describe ( 'getUser' , ( ) => {
281
+ it ( 'calls transport' , async ( ) => {
282
+ await accountsClient . getUser ( ) ;
283
+ expect ( mockTransport . getUser ) . toHaveBeenCalledWith ( ) ;
284
+ } ) ;
285
+ } ) ;
286
+
287
+ describe ( 'mfaChallenge' , ( ) => {
288
+ it ( 'calls transport' , async ( ) => {
289
+ await accountsClient . mfaChallenge ( 'mfaTokenTest' , 'authenticatorIdTest' ) ;
290
+ expect ( mockTransport . mfaChallenge ) . toHaveBeenCalledWith (
291
+ 'mfaTokenTest' ,
292
+ 'authenticatorIdTest'
293
+ ) ;
294
+ } ) ;
295
+ } ) ;
296
+
297
+ describe ( 'mfaAssociate' , ( ) => {
298
+ it ( 'calls transport' , async ( ) => {
299
+ await accountsClient . mfaAssociate ( 'typeTest' ) ;
300
+ expect ( mockTransport . mfaAssociate ) . toHaveBeenCalledWith ( 'typeTest' , undefined ) ;
301
+ } ) ;
302
+ } ) ;
303
+
304
+ describe ( 'mfaAssociateByMfaToken' , ( ) => {
305
+ it ( 'calls transport' , async ( ) => {
306
+ await accountsClient . mfaAssociateByMfaToken ( 'mfaTokenTest' , 'typeTest' ) ;
307
+ expect ( mockTransport . mfaAssociateByMfaToken ) . toHaveBeenCalledWith (
308
+ 'mfaTokenTest' ,
309
+ 'typeTest' ,
310
+ undefined
311
+ ) ;
312
+ } ) ;
313
+ } ) ;
314
+
315
+ describe ( 'authenticators' , ( ) => {
316
+ it ( 'calls transport' , async ( ) => {
317
+ await accountsClient . authenticators ( ) ;
318
+ expect ( mockTransport . authenticators ) . toHaveBeenCalledWith ( ) ;
319
+ } ) ;
320
+ } ) ;
321
+
322
+ describe ( 'authenticatorsByMfaToken' , ( ) => {
323
+ it ( 'calls transport' , async ( ) => {
324
+ await accountsClient . authenticatorsByMfaToken ( 'mfaTokenTest' ) ;
325
+ expect ( mockTransport . authenticatorsByMfaToken ) . toHaveBeenCalledWith ( 'mfaTokenTest' ) ;
326
+ } ) ;
327
+ } ) ;
273
328
} ) ;
0 commit comments