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 <cjihrig@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
1 parent fb4b650 commit 63fafb8

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
'use strict';
2-
varcommon=require('../common');
3-
varassert=require('assert');
2+
constcommon=require('../common');
43

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

11-
varstream=require('stream');
12-
vars=newstream.PassThrough();
13-
varh=crypto.createHash('sha1');
14-
varexpect='15987e60950cf22655b9323bc1e281f9c4aff47e';
9+
constassert=require('assert');
10+
constcrypto=require('crypto');
11+
12+
conststream=require('stream');
13+
consts=newstream.PassThrough();
14+
consth=crypto.createHash('sha1');
15+
constexpect='15987e60950cf22655b9323bc1e281f9c4aff47e';
1516

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

0 commit comments

Comments
 (0)