11cb0ef41Sopenharmony_ci'use strict'; 21cb0ef41Sopenharmony_cirequire('../common'); 31cb0ef41Sopenharmony_ciconst assert = require('assert'); 41cb0ef41Sopenharmony_ci 51cb0ef41Sopenharmony_ci// This checks that after accessing a missing env var, a subsequent 61cb0ef41Sopenharmony_ci// env read will succeed even for empty variables. 71cb0ef41Sopenharmony_ci 81cb0ef41Sopenharmony_ci{ 91cb0ef41Sopenharmony_ci process.env.FOO = ''; 101cb0ef41Sopenharmony_ci process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions 111cb0ef41Sopenharmony_ci const foo = process.env.FOO; 121cb0ef41Sopenharmony_ci 131cb0ef41Sopenharmony_ci assert.strictEqual(foo, ''); 141cb0ef41Sopenharmony_ci} 151cb0ef41Sopenharmony_ci 161cb0ef41Sopenharmony_ci{ 171cb0ef41Sopenharmony_ci process.env.FOO = ''; 181cb0ef41Sopenharmony_ci process.env.NONEXISTENT_ENV_VAR; // eslint-disable-line no-unused-expressions 191cb0ef41Sopenharmony_ci const hasFoo = 'FOO' in process.env; 201cb0ef41Sopenharmony_ci 211cb0ef41Sopenharmony_ci assert.strictEqual(hasFoo, true); 221cb0ef41Sopenharmony_ci} 23