Skip to content

Commit

Permalink
test: refactor test-crypto-hash-stream-pipe
Browse files Browse the repository at this point in the history
Change var to const.

PR-URL: #10055
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
  • Loading branch information
matt-wilson-cc authored and addaleax committed Dec 5, 2016
1 parent fb4b650 commit 63fafb8
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/parallel/test-crypto-hash-stream-pipe.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
'use strict';
var common = require('../common');
var assert = require('assert');
const common = require('../common');

if (!common.hasCrypto) {
common.skip('missing crypto');
return;
}
var crypto = require('crypto');

var stream = require('stream');
var s = new stream.PassThrough();
var h = crypto.createHash('sha1');
var expect = '15987e60950cf22655b9323bc1e281f9c4aff47e';
const assert = require('assert');
const crypto = require('crypto');

const stream = require('stream');
const s = new stream.PassThrough();
const h = crypto.createHash('sha1');
const expect = '15987e60950cf22655b9323bc1e281f9c4aff47e';

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

0 comments on commit 63fafb8

Please sign in to comment.