From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Mon, 7 Aug 2023 13:12:29 -0500
Subject: ci: ensure node tests set ELECTRON_RUN_AS_NODE=1

Some node tests / test fixtures spawn other tests that clobber env,
which causes the `ELECTRON_RUN_AS_NODE` variable to be lost. This patch
re-injects it.

diff --git a/test/fixtures/test-runner/output/arbitrary-output-colored.js b/test/fixtures/test-runner/output/arbitrary-output-colored.js
index af23e674cb361ed81dafa22670d5633559cd1144..1dd59990cb7cdba8aecf4f499ee6b92e7cd41b30 100644
--- a/test/fixtures/test-runner/output/arbitrary-output-colored.js
+++ b/test/fixtures/test-runner/output/arbitrary-output-colored.js
@@ -7,6 +7,6 @@ const fixtures = require('../../../common/fixtures');
 (async function run() {
   const test = fixtures.path('test-runner/output/arbitrary-output-colored-1.js');
   const reset = fixtures.path('test-runner/output/reset-color-depth.js');
-  await once(spawn(process.execPath, ['-r', reset, '--test', test], { stdio: 'inherit' }), 'exit');
-  await once(spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit'  }), 'exit');
+  await once(spawn(process.execPath, ['-r', reset, '--test', test], { stdio: 'inherit', env: { ELECTRON_RUN_AS_NODE: 1 }}), 'exit');
+  await once(spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit', env: { ELECTRON_RUN_AS_NODE: 1 }  }), 'exit');
 })().then(common.mustCall());
