mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
7534477786
PR-URL: https://github.com/nodejs/node/pull/32542 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
20 lines
617 B
JavaScript
20 lines
617 B
JavaScript
'use strict';
|
|
// Flags: --expose-internals
|
|
|
|
require('../common');
|
|
const assert = require('assert');
|
|
const { internalBinding } = require('internal/test/binding');
|
|
const { safeGetenv } = internalBinding('credentials');
|
|
|
|
// FIXME(joyeecheung): this test is not entirely useful. To properly
|
|
// test this we could create a mismatch between the effective/real
|
|
// group/user id of a Node.js process and see if the environment variables
|
|
// are no longer available - but that might be tricky to set up reliably.
|
|
|
|
for (const oneEnv in process.env) {
|
|
assert.strictEqual(
|
|
safeGetenv(oneEnv),
|
|
process.env[oneEnv]
|
|
);
|
|
}
|