File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -8,23 +8,23 @@ test('salt_length', () => {
8
8
return Promise . all ( Array . from ( { length : EXPECTED } ,
9
9
( ) => bcrypt . genSalt ( 10 )
10
10
. then ( salt => expect ( salt ) . toHaveLength ( 29 ) ) ) ) ;
11
- } )
11
+ } , 10e3 )
12
12
13
13
test ( 'test_hash_length' , ( ) => {
14
14
expect . assertions ( EXPECTED ) ;
15
15
const SALT = '$2a$04$TnjywYklQbbZjdjBgBoA4e' ;
16
16
return Promise . all ( Array . from ( { length : EXPECTED } ,
17
17
( ) => bcrypt . hash ( 'test' , SALT )
18
18
. then ( hash => expect ( hash ) . toHaveLength ( 60 ) ) ) ) ;
19
- } )
19
+ } , 10e3 )
20
20
21
21
test ( 'test_compare' , ( ) => {
22
22
expect . assertions ( EXPECTED ) ;
23
23
const HASH = '$2a$04$TnjywYklQbbZjdjBgBoA4e9G7RJt9blgMgsCvUvus4Iv4TENB5nHy' ;
24
24
return Promise . all ( Array . from ( { length : EXPECTED } ,
25
25
( ) => bcrypt . compare ( 'test' , HASH )
26
26
. then ( match => expect ( match ) . toEqual ( true ) ) ) ) ;
27
- } )
27
+ } , 10e3 )
28
28
29
29
test ( 'test_hash_and_compare' , ( ) => {
30
30
expect . assertions ( EXPECTED * 3 ) ;
@@ -42,5 +42,5 @@ test('test_hash_and_compare', () => {
42
42
return Promise . all ( [ goodCompare , badCompare ] ) ;
43
43
} ) ;
44
44
} ) ) ;
45
- } , 10000 ) ;
45
+ } , 30e3 ) ;
46
46
You can’t perform that action at this time.
0 commit comments