0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-process-env-deprecation.js

17 lines
466 B
JavaScript
Raw Normal View History

'use strict';
const common = require('../common');
const assert = require('assert');
// Flags: --pending-deprecation
common.expectWarning(
'DeprecationWarning',
'Assigning any value other than a string, number, or boolean to a ' +
'process.env property is deprecated. Please make sure to convert the value ' +
'to a string before setting process.env with it.',
'DEP0104'
);
process.env.ABC = undefined;
assert.strictEqual(process.env.ABC, 'undefined');