Skip to content

Commit cdf028c

Browse files
edsadrevanlucas
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 <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 94a894a commit cdf028c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/parallel/test-vm-symbols.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
'use strict';
22

33
require('../common');
4-
var assert = require('assert');
4+
const assert = require('assert');
55

6-
var vm = require('vm');
6+
const vm = require('vm');
77

8-
var symbol = Symbol();
8+
const symbol = Symbol();
99

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

18-
var context = new Document();
18+
const context = new Document();
1919
vm.createContext(context);
2020

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

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

0 commit comments

Comments
 (0)