From cdf028c5a63f39777c1f9b6e2392c7e5a25c2a9f Mon Sep 17 00:00:00 2001 From: Adrian Estrada Date: Fri, 23 Dec 2016 14:01:17 -0500 Subject: [PATCH] test: improve code in test-vm-symbols * use const instead of var * use assert.strictEqual instead of assert.equal PR-URL: https://github.com/nodejs/node/pull/10429 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Luigi Pinca --- test/parallel/test-vm-symbols.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-vm-symbols.js b/test/parallel/test-vm-symbols.js index f80609c0101d51..0867c7253dcec4 100644 --- a/test/parallel/test-vm-symbols.js +++ b/test/parallel/test-vm-symbols.js @@ -1,11 +1,11 @@ 'use strict'; require('../common'); -var assert = require('assert'); +const assert = require('assert'); -var vm = require('vm'); +const vm = require('vm'); -var symbol = Symbol(); +const symbol = Symbol(); function Document() { this[symbol] = 'foo'; @@ -15,11 +15,11 @@ Document.prototype.getSymbolValue = function() { return this[symbol]; }; -var context = new Document(); +const context = new Document(); vm.createContext(context); -assert.equal(context.getSymbolValue(), 'foo', - 'should return symbol-keyed value from the outside'); +assert.strictEqual(context.getSymbolValue(), 'foo', + 'should return symbol-keyed value from the outside'); -assert.equal(vm.runInContext('this.getSymbolValue()', context), 'foo', - 'should return symbol-keyed value from the inside'); +assert.strictEqual(vm.runInContext('this.getSymbolValue()', context), 'foo', + 'should return symbol-keyed value from the inside');