File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ if (!common.hasCrypto)
25
25
common . skip ( 'missing crypto' ) ;
26
26
27
27
const assert = require ( 'assert' ) ;
28
- const domain = require ( 'domain' ) ;
29
28
const crypto = require ( 'crypto' ) ;
29
+ const domain = require ( 'domain' ) ;
30
30
31
31
function test ( fn ) {
32
32
const ex = new Error ( 'BAM' ) ;
Original file line number Diff line number Diff line change @@ -4,8 +4,9 @@ if (!common.hasCrypto)
4
4
common . skip ( 'missing crypto' ) ;
5
5
6
6
const assert = require ( 'assert' ) ;
7
- const fs = require ( 'fs' ) ;
8
7
const crypto = require ( 'crypto' ) ;
8
+ const fs = require ( 'fs' ) ;
9
+
9
10
const fixtures = require ( '../common/fixtures' ) ;
10
11
11
12
// Test hashing
@@ -80,11 +81,11 @@ const fileStream = fs.createReadStream(fn);
80
81
fileStream . on ( 'data' , function ( data ) {
81
82
sha1Hash . update ( data ) ;
82
83
} ) ;
83
- fileStream . on ( 'close' , function ( ) {
84
+ fileStream . on ( 'close' , common . mustCall ( function ( ) {
84
85
assert . strictEqual ( sha1Hash . digest ( 'hex' ) ,
85
86
'22723e553129a336ad96e10f6aecdf0f45e4149e' ,
86
87
'Test SHA1 of sample.png' ) ;
87
- } ) ;
88
+ } ) ) ;
88
89
89
90
// Issue #2227: unknown digest method should throw an error.
90
91
assert . throws ( function ( ) {
You can’t perform that action at this time.
0 commit comments