• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2// Flags: --expose-internals
3
4require('../common');
5const assert = require('assert');
6const { internalBinding } = require('internal/test/binding');
7const { safeGetenv } = internalBinding('credentials');
8
9// FIXME(joyeecheung): this test is not entirely useful. To properly
10// test this we could create a mismatch between the effective/real
11// group/user id of a Node.js process and see if the environment variables
12// are no longer available - but that might be tricky to set up reliably.
13
14for (const oneEnv in process.env) {
15  assert.strictEqual(
16    safeGetenv(oneEnv),
17    process.env[oneEnv]
18  );
19}
20