@@ -73,22 +73,22 @@ describe('random', () => {
73
73
} ) ;
74
74
} ) ;
75
75
76
- it ( 'simple test (do sth) ' , ( ) => {
76
+ it ( 'simple test 1 ' , ( ) => {
77
77
const buf = Buffer . alloc ( 10 ) ;
78
78
const before = buf . toString ( 'hex' ) ;
79
79
const after = crypto . randomFillSync ( buf ) . toString ( 'hex' ) ;
80
80
assert . notStrictEqual ( before , after ) ;
81
81
} ) ;
82
82
83
- it ( 'simple test (do sth) 2' , ( ) => {
83
+ it ( 'simple test 2' , ( ) => {
84
84
const buf = new Uint8Array ( new Array ( 10 ) . fill ( 0 ) ) ;
85
85
const before = Buffer . from ( buf ) . toString ( 'hex' ) ;
86
86
crypto . randomFillSync ( buf ) ;
87
87
const after = Buffer . from ( buf ) . toString ( 'hex' ) ;
88
88
assert . notStrictEqual ( before , after ) ;
89
89
} ) ;
90
90
91
- it ( 'simple test (do sth) 3' , ( ) => {
91
+ it ( 'simple test 3' , ( ) => {
92
92
[
93
93
new Uint16Array ( 10 ) ,
94
94
new Uint32Array ( 10 ) ,
@@ -103,7 +103,7 @@ describe('random', () => {
103
103
} ) ;
104
104
} ) ;
105
105
106
- it ( 'simple test (do sth) 4 - random Fill Sync AB' , ( ) => {
106
+ it ( 'simple test 4 - random Fill Sync AB' , ( ) => {
107
107
[ new ArrayBuffer ( 10 ) , new ArrayBuffer ( 10 ) ] . forEach ( ( buf ) => {
108
108
const before = Buffer . from ( buf ) . toString ( 'hex' ) ;
109
109
crypto . randomFillSync ( buf ) ;
@@ -112,7 +112,7 @@ describe('random', () => {
112
112
} ) ;
113
113
} ) ;
114
114
115
- it ( 'simple test (do sth) 5- random Fill ' , ( done : Done ) => {
115
+ it ( 'simple test 5- random Fill ' , ( done : Done ) => {
116
116
const buf = Buffer . alloc ( 10 ) ;
117
117
const before = buf . toString ( 'hex' ) ;
118
118
@@ -127,7 +127,7 @@ describe('random', () => {
127
127
} ) ;
128
128
} ) ;
129
129
130
- it ( 'simple test (do sth) 6 ' , ( done : Done ) => {
130
+ it ( 'simple test 6 ' , ( done : Done ) => {
131
131
const buf = new Uint8Array ( new Array ( 10 ) . fill ( 0 ) ) ;
132
132
const before = Buffer . from ( buf ) . toString ( 'hex' ) ;
133
133
@@ -172,7 +172,7 @@ describe('random', () => {
172
172
} ) ;
173
173
} ) ;
174
174
175
- it ( 'simple test (do sth) 8' , ( done : Done ) => {
175
+ it ( 'simple test 8' , ( done : Done ) => {
176
176
let ctr = 0 ;
177
177
[ new ArrayBuffer ( 10 ) , new ArrayBuffer ( 10 ) ] . forEach ( ( buf ) => {
178
178
const before = Buffer . from ( buf ) . toString ( 'hex' ) ;
@@ -416,7 +416,7 @@ describe('random', () => {
416
416
} ) ;
417
417
418
418
it ( 'randomInt - Synchronous API' , ( ) => {
419
- const randomInts = [ ] ;
419
+ const randomInts : number [ ] = [ ] ;
420
420
for ( let i = 0 ; i < 100 ; i ++ ) {
421
421
const n = crypto . randomInt ( 3 ) ;
422
422
assert . ok ( n >= 0 ) ;
@@ -609,7 +609,6 @@ describe('random', () => {
609
609
[ true , NaN , null , { } , [ ] , 10 ] . forEach ( ( val ) => {
610
610
it ( `expect type error: ${ val } ` , ( ) => {
611
611
assert . throws (
612
- // @ts -expect-error bad callback
613
612
( ) => crypto . randomInt ( 0 , 1 , val ) ,
614
613
/ c a l l b a c k m u s t b e a f u n c t i o n o r u n d e f i n e d / ,
615
614
) ;
0 commit comments