test: refactor assert.equal, update assert.throws by prietoguy · Pull Request #9914 · nodejs/node · GitHub
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/parallel/test-buffer-arraybuffer.js
18 changes: 9 additions & 9 deletions test/parallel/test-child-process-stdio-inherit.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
'use strict';
var common = require('../common');
var assert = require('assert');
var spawn = require('child_process').spawn;
const common = require('../common');
const assert = require('assert');
const spawn = require('child_process').spawn;

if (process.argv[2] === 'parent')
parent();
else
grandparent();

function grandparent() {
var child = spawn(process.execPath, [__filename, 'parent']);
let child = spawn(process.execPath, [__filename, 'parent']);
child.stderr.pipe(process.stderr);
var output = '';
var input = 'asdfasdf';
let output = '';
const input = 'asdfasdf';

child.stdout.on('data', function(chunk) {
output += chunk;
Expand All @@ -22,10 +22,10 @@ function grandparent() {
child.stdin.end(input);

child.on('close', function(code, signal) {
assert.equal(code, 0);
assert.equal(signal, null);
assert.strictEqual(code, 0);
assert.strictEqual(signal, null);
// cat on windows adds a \r\n at the end.
assert.equal(output.trim(), input.trim());
assert.strictEqual(output.trim(), input.trim());
});
}

Expand Down
74 changes: 37 additions & 37 deletions test/parallel/test-crypto-dh.js