test: be explicit about polluting of global
There was a comment in `test-domain-crypto.js` indicating that the pollution of the `global` object with a `domain` property was intentional. Provide more information in the comment so someone may easily determine why. Use `global.domain` rather than declaring `domain` without the `var` keyword to more clearly signal that the pollution is intentional. PR-URL: https://github.com/nodejs/node/pull/6017 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
parent
858b4b3770
commit
ae2be27add
@ -6,8 +6,9 @@ try {
|
||||
return;
|
||||
}
|
||||
|
||||
// the missing var keyword is intentional
|
||||
domain = require('domain');
|
||||
// Pollution of global is intentional as part of test.
|
||||
// See https://github.com/nodejs/node/commit/d1eff9ab
|
||||
global.domain = require('domain');
|
||||
|
||||
// should not throw a 'TypeError: undefined is not a function' exception
|
||||
crypto.randomBytes(8);
|
||||
|
Loading…
x
Reference in New Issue
Block a user