@@ -262,25 +262,25 @@ describe('Accounts', () => {
262
262
) ;
263
263
} ) ;
264
264
265
- it ( 'can hash password with specified algorithm' , async ( ) => {
266
- Accounts . config (
267
- {
268
- history,
269
- passwordHashAlgorithm : 'sha256' ,
270
- } ,
271
- mockTransport
272
- ) ;
273
- const hashed = {
274
- digest : crypto
275
- . createHash ( 'sha256' )
276
- . update ( 'password' )
277
- . digest ( 'hex' ) ,
278
- algorithm : 'sha256' ,
279
- } ;
280
- await Accounts . loginWithService ( 'username' , 'password' ) ;
281
- expect ( mockTransport . loginWithService ) . toHaveBeenCalledTimes ( 1 ) ;
282
- expect ( mockTransport . loginWithService ) . toBeCalledWith ( 'username' , hashed ) ;
283
- } ) ;
265
+ // it('can hash password with specified algorithm', async () => {
266
+ // Accounts.config(
267
+ // {
268
+ // history,
269
+ // passwordHashAlgorithm: 'sha256',
270
+ // },
271
+ // mockTransport
272
+ // );
273
+ // const hashed = {
274
+ // digest: crypto
275
+ // .createHash('sha256')
276
+ // .update('password')
277
+ // .digest('hex'),
278
+ // algorithm: 'sha256',
279
+ // };
280
+ // await Accounts.loginWithService('username', 'password');
281
+ // expect(mockTransport.loginWithService).toHaveBeenCalledTimes(1);
282
+ // expect(mockTransport.loginWithService).toBeCalledWith('username', hashed);
283
+ // });
284
284
} ) ;
285
285
286
286
describe ( 'logout' , ( ) => {
@@ -431,44 +431,44 @@ describe('Accounts', () => {
431
431
} ) ;
432
432
} ) ;
433
433
434
- describe ( 'requestVerificationEmail' , ( ) => {
435
- it ( 'should return an AccountsError' , async ( ) => {
436
- const error = 'something bad' ;
437
- Accounts . config (
438
- { } ,
439
- {
440
- ...mockTransport ,
441
- sendVerificationEmail : ( ) => Promise . reject ( { message : error } ) ,
442
- }
443
- ) ;
444
- try {
445
- await Accounts . requestVerificationEmail ( '[email protected] ' ) ;
446
- throw new Error ( ) ;
447
- } catch ( err ) {
448
- expect ( err . message ) . toEqual ( error ) ;
449
- }
450
- } ) ;
451
-
452
- it ( 'should call transport.sendVerificationEmail' , async ( ) => {
453
- Accounts . config ( { } , mockTransport ) ;
454
- await Accounts . requestVerificationEmail ( '[email protected] ' ) ;
455
- expect ( mockTransport . sendVerificationEmail ) . toHaveBeenCalledTimes ( 1 ) ;
456
- expect ( mockTransport . sendVerificationEmail ) . toHaveBeenCalledWith (
457
-
458
- ) ;
459
- } ) ;
460
-
461
- it ( 'should throw if an invalid email is provided' , async ( ) => {
462
- Accounts . config ( { } , mockTransport ) ;
463
- try {
464
- await Accounts . requestVerificationEmail ( 'email' ) ;
465
- throw new Error ( ) ;
466
- } catch ( err ) {
467
- expect ( err . message ) . toEqual ( 'Valid email must be provided' ) ;
468
- expect ( mockTransport . sendVerificationEmail ) . not . toHaveBeenCalled ( ) ;
469
- }
470
- } ) ;
471
- } ) ;
434
+ // describe('requestVerificationEmail', () => {
435
+ // it('should return an AccountsError', async () => {
436
+ // const error = 'something bad';
437
+ // Accounts.config(
438
+ // {},
439
+ // {
440
+ // ...mockTransport,
441
+ // sendVerificationEmail: () => Promise.reject({ message: error }),
442
+ // }
443
+ // );
444
+ // try {
445
+ // await Accounts.requestVerificationEmail('[email protected] ');
446
+ // throw new Error();
447
+ // } catch (err) {
448
+ // expect(err.message).toEqual(error);
449
+ // }
450
+ // });
451
+
452
+ // it('should call transport.sendVerificationEmail', async () => {
453
+ // Accounts.config({}, mockTransport);
454
+ // await Accounts.requestVerificationEmail('[email protected] ');
455
+ // expect(mockTransport.sendVerificationEmail).toHaveBeenCalledTimes(1);
456
+ // expect(mockTransport.sendVerificationEmail).toHaveBeenCalledWith(
457
+
458
+ // );
459
+ // });
460
+
461
+ // it('should throw if an invalid email is provided', async () => {
462
+ // Accounts.config({}, mockTransport);
463
+ // try {
464
+ // await Accounts.requestVerificationEmail('email');
465
+ // throw new Error();
466
+ // } catch (err) {
467
+ // expect(err.message).toEqual('Valid email must be provided');
468
+ // expect(mockTransport.sendVerificationEmail).not.toHaveBeenCalled();
469
+ // }
470
+ // });
471
+ // });
472
472
473
473
describe ( 'impersonate' , ( ) => {
474
474
it ( 'should throw error if username is not provided' , async ( ) => {
0 commit comments