11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ciconst common = require('../common');
31cb0ef41Sopenharmony_ciconst assert = require('assert');
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ci// Flags: --pending-deprecation
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_cicommon.expectWarning(
81cb0ef41Sopenharmony_ci  'DeprecationWarning',
91cb0ef41Sopenharmony_ci  'Assigning any value other than a string, number, or boolean to a ' +
101cb0ef41Sopenharmony_ci  'process.env property is deprecated. Please make sure to convert the value ' +
111cb0ef41Sopenharmony_ci  'to a string before setting process.env with it.',
121cb0ef41Sopenharmony_ci  'DEP0104'
131cb0ef41Sopenharmony_ci);
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ci// Make sure setting a valid environment variable doesn't
161cb0ef41Sopenharmony_ci// result in warning being suppressed, see:
171cb0ef41Sopenharmony_ci// https://github.com/nodejs/node/pull/25157
181cb0ef41Sopenharmony_ciprocess.env.FOO = 'apple';
191cb0ef41Sopenharmony_ciprocess.env.ABC = undefined;
201cb0ef41Sopenharmony_ciassert.strictEqual(process.env.ABC, 'undefined');
21