Skip to content

Commit 63fafb8

Browse files
matt-wilson-ccaddaleax
authored andcommitted
test: refactor test-crypto-hash-stream-pipe
Change var to const. PR-URL: #10055 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]>
1 parent fb4b650 commit 63fafb8

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

test/parallel/test-crypto-hash-stream-pipe.js

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
'use strict';
2-
var common = require('../common');
3-
var assert = require('assert');
2+
const common = require('../common');
43

54
if (!common.hasCrypto) {
65
common.skip('missing crypto');
76
return;
87
}
9-
var crypto = require('crypto');
108

11-
var stream = require('stream');
12-
var s = new stream.PassThrough();
13-
var h = crypto.createHash('sha1');
14-
var expect = '15987e60950cf22655b9323bc1e281f9c4aff47e';
9+
const assert = require('assert');
10+
const crypto = require('crypto');
11+
12+
const stream = require('stream');
13+
const s = new stream.PassThrough();
14+
const h = crypto.createHash('sha1');
15+
const expect = '15987e60950cf22655b9323bc1e281f9c4aff47e';
1516

1617
s.pipe(h).on('data', common.mustCall(function(c) {
1718
assert.strictEqual(c, expect);

0 commit comments

Comments
 (0)