| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 8a26ba1 commit 56b193a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,25 +1,25 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 3 | 3 | require('../common'); | |
| 4 | - var assert = require('assert'); | ||
| 4 | + const assert = require('assert'); | ||
| 5 | 5 | ||
| 6 | - var vm = require('vm'); | ||
| 6 | + const vm = require('vm'); | ||
| 7 | 7 | ||
| 8 | - var x = {}; | ||
| 8 | + const x = {}; | ||
| 9 | 9 | Object.defineProperty(x, 'prop', { | |
| 10 | 10 | configurable: false, | |
| 11 | 11 | enumerable: false, | |
| 12 | 12 | writable: false, | |
| 13 | 13 | value: 'val' | |
| 14 | 14 | }); | |
| 15 | - var o = vm.createContext(x); | ||
| 15 | + const o = vm.createContext(x); | ||
| 16 | 16 | ||
| 17 | - var code = 'Object.getOwnPropertyDescriptor(this, "prop")'; | ||
| 18 | - var res = vm.runInContext(code, o, 'test'); | ||
| 17 | + const code = 'Object.getOwnPropertyDescriptor(this, "prop")'; | ||
| 18 | + const res = vm.runInContext(code, o, 'test'); | ||
| 19 | 19 | ||
| 20 | 20 | assert(res); | |
| 21 | - assert.equal(typeof res, 'object'); | ||
| 22 | - assert.equal(res.value, 'val'); | ||
| 23 | - assert.equal(res.configurable, false, 'should not be configurable'); | ||
| 24 | - assert.equal(res.enumerable, false, 'should not be enumerable'); | ||
| 25 | - assert.equal(res.writable, false, 'should not be writable'); | ||
| 21 | + assert.strictEqual(typeof res, 'object'); | ||
| 22 | + assert.strictEqual(res.value, 'val'); | ||
| 23 | + assert.strictEqual(res.configurable, false, 'should not be configurable'); | ||
| 24 | + assert.strictEqual(res.enumerable, false, 'should not be enumerable'); | ||
| 25 | + assert.strictEqual(res.writable, false, 'should not be writable'); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments