From e9d4665b2938105598e81234179bd321514c6aa5 Mon Sep 17 00:00:00 2001 From: Sarah Meyer Date: Thu, 1 Dec 2016 10:16:53 -0600 Subject: [PATCH] test: use const instead of var in test-require-json.js PR-URL: https://github.com/nodejs/node/pull/9904 Reviewed-By: Colin Ihrig Reviewed-By: Myles Borins Reviewed-By: Anna Henningsen Reviewed-By: Luigi Pinca Reviewed-By: James M Snell --- test/parallel/test-require-json.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-require-json.js b/test/parallel/test-require-json.js index 75cdb98855e6ee..f2c74dc57d743d 100644 --- a/test/parallel/test-require-json.js +++ b/test/parallel/test-require-json.js @@ -1,12 +1,12 @@ 'use strict'; -var common = require('../common'); -var path = require('path'); -var assert = require('assert'); +const common = require('../common'); +const path = require('path'); +const assert = require('assert'); try { require(path.join(common.fixturesDir, 'invalid.json')); } catch (err) { - var re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/; - var i = err.message.match(re); + const re = /test[/\\]fixtures[/\\]invalid.json: Unexpected string/; + const i = err.message.match(re); assert.notStrictEqual(null, i, 'require() json error should include path'); }