| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 53520f0 commit d24bd20
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -188,6 +188,12 @@ | |||
| 188 | 188 | } | |
| 189 | 189 | ||
| 190 | 190 | function setupGlobalVariables() { | |
| 191 | + Object.defineProperty(global, Symbol.toStringTag, { | ||
| 192 | + value: 'global', | ||
| 193 | + writable: false, | ||
| 194 | + enumerable: false, | ||
| 195 | + configurable: true | ||
| 196 | + }); | ||
| 191 | 197 | global.process = process; | |
| 192 | 198 | const util = NativeModule.require('util'); | |
| 193 | 199 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,3 +21,5 @@ const fooBar = module.fooBar; | |||
| 21 | 21 | assert.strictEqual('foo', fooBar.foo, 'x -> global.x in sub level not working'); | |
| 22 | 22 | ||
| 23 | 23 | assert.strictEqual('bar', fooBar.bar, 'global.x -> x in sub level not working'); | |
| 24 | + | ||
| 25 | + assert.strictEqual(Object.prototype.toString.call(global), '[object global]'); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments