Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9840f50

Browse filesBrowse 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
Copy full SHA for 9840f50

File tree

Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-6
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboard
+6-6Lines 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-
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',
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.