diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2018-05-14 14:30:24 +0200 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-05-19 17:55:54 +0200 |
commit | cbee12c70160ec4d123194668451c908faf446bd (patch) | |
tree | fdbcca95384fda6eecccbd4acfd8a2acea0518db /test/message | |
parent | 8254e389f53703f33951c56e5e0ec11a2d51f661 (diff) | |
download | android-node-v8-cbee12c70160ec4d123194668451c908faf446bd.tar.gz android-node-v8-cbee12c70160ec4d123194668451c908faf446bd.tar.bz2 android-node-v8-cbee12c70160ec4d123194668451c908faf446bd.zip |
test: remove untested knownGlobals
These values are all non-enumerable and will never be checked.
By removing them, we make sure they will not become enumerable
unnoticed.
PR-URL: https://github.com/nodejs/node/pull/20717
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/message')
-rw-r--r-- | test/message/console_low_stack_space.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/message/console_low_stack_space.js b/test/message/console_low_stack_space.js index 9128eb49d1..4834ffd9cd 100644 --- a/test/message/console_low_stack_space.js +++ b/test/message/console_low_stack_space.js @@ -1,8 +1,11 @@ 'use strict'; -// copy console accessor because requiring ../common touches it +// Copy console accessor because requiring ../common touches it const consoleDescriptor = Object.getOwnPropertyDescriptor(global, 'console'); -delete global.console; -global.console = {}; +Object.defineProperty(global, 'console', { + configurable: true, + writable: true, + value: {} +}); require('../common'); |