Skip to content

Commit

Permalink
test: refactor child-process-spawn-error
Browse files Browse the repository at this point in the history
Use const instead of var for assignments.

PR-URL: #9951
Reviewed-By: Prince John Wesley <princejohnwesley@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information
Johnny Reading authored and addaleax committed Dec 5, 2016
1 parent b73f6b7 commit 8f550df
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/parallel/test-child-process-spawn-error.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use strict';
var common = require('../common');
var spawn = require('child_process').spawn;
var assert = require('assert');
const common = require('../common');
const spawn = require('child_process').spawn;
const assert = require('assert');

var enoentPath = 'foo123';
var spawnargs = ['bar'];
const enoentPath = 'foo123';
const spawnargs = ['bar'];
assert.strictEqual(common.fileExists(enoentPath), false);

var enoentChild = spawn(enoentPath, spawnargs);
const enoentChild = spawn(enoentPath, spawnargs);
enoentChild.on('error', common.mustCall(function(err) {
assert.strictEqual(err.code, 'ENOENT');
assert.strictEqual(err.errno, 'ENOENT');
Expand Down

0 comments on commit 8f550df

Please sign in to comment.