Skip to content

Commit 9840f50

Browse files
edsadrMylesBorins
authored andcommitted
test: improve code in test-vm-symbols
* use const instead of var * use assert.strictEqual instead of assert.equal PR-URL: #10429 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4efdbaf commit 9840f50

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎test/parallel/test-vm-symbols.js‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
22

33
require('../common');
4-
varassert=require('assert');
4+
constassert=require('assert');
55

6-
varvm=require('vm');
6+
constvm=require('vm');
77

8-
varsymbol=Symbol();
8+
constsymbol=Symbol();
99

1010
functionDocument(){
1111
this[symbol]='foo';
@@ -15,11 +15,11 @@ Document.prototype.getSymbolValue = function() {
1515
returnthis[symbol];
1616
};
1717

18-
varcontext=newDocument();
18+
constcontext=newDocument();
1919
vm.createContext(context);
2020

21-
assert.equal(context.getSymbolValue(),'foo',
21+
assert.strictEqual(context.getSymbolValue(),'foo',
2222
'should return symbol-keyed value from the outside');
2323

24-
assert.equal(vm.runInContext('this.getSymbolValue()',context),'foo',
24+
assert.strictEqual(vm.runInContext('this.getSymbolValue()',context),'foo',
2525
'should return symbol-keyed value from the inside');

0 commit comments

Comments
 (0)