Skip to content

Commit a284ee6

Browse files
Griffith TchenpanMylesBorins
Griffith Tchenpan
authored andcommitted
test: invoke callback with common.mustCall()
* invoke callback with `common.mustCall()` in test-crypto-hash * order module declarations aphabetically per test-writing-guide PR-URL: #8597 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 32260b9 commit a284ee6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/parallel/test-crypto-domain.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ if (!common.hasCrypto)
44
common.skip('missing crypto');
55

66
const assert = require('assert');
7-
const domain = require('domain');
87
const crypto = require('crypto');
8+
const domain = require('domain');
99

1010
function test(fn) {
1111
const ex = new Error('BAM');

test/parallel/test-crypto-hash.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ const fileStream = fs.createReadStream(fn);
8080
fileStream.on('data', function(data) {
8181
sha1Hash.update(data);
8282
});
83-
fileStream.on('close', function() {
83+
fileStream.on('close', common.mustCall(function() {
8484
assert.strictEqual(sha1Hash.digest('hex'),
8585
'22723e553129a336ad96e10f6aecdf0f45e4149e',
8686
'Test SHA1 of sample.png');
87-
});
87+
}));
8888

8989
// Issue #2227: unknown digest method should throw an error.
9090
assert.throws(function() {

0 commit comments

Comments
 (0)