From 5be66db688f5d266d29df8e6ebb45fadcf9bd076 Mon Sep 17 00:00:00 2001 From: Johnny Reading Date: Thu, 1 Dec 2016 10:43:40 -0600 Subject: [PATCH] test: refactor child-process-spawn-error Use const instead of var for assignments. PR-URL: https://github.com/nodejs/node/pull/9951 Reviewed-By: Prince John Wesley Reviewed-By: Colin Ihrig --- test/parallel/test-child-process-spawn-error.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/parallel/test-child-process-spawn-error.js b/test/parallel/test-child-process-spawn-error.js index 1a9de1e18b523b..6cd3c47eef46ad 100644 --- a/test/parallel/test-child-process-spawn-error.js +++ b/test/parallel/test-child-process-spawn-error.js @@ -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');