diff --git a/test/parallel/test-worker-env-option-with-v8-cli-flags.js b/test/parallel/test-worker-env-option-with-v8-cli-flags.js new file mode 100644 index 00000000000000..4af6d4c82331bc --- /dev/null +++ b/test/parallel/test-worker-env-option-with-v8-cli-flags.js @@ -0,0 +1,9 @@ +// Flags: --expose_gc +'use strict'; +require('../common'); +const { Worker } = require('worker_threads'); + +// Test that it does not crash +new Worker('', { eval: true, env: {} }); +new Worker('', { eval: true, env: process.env }); +new Worker('', { eval: true, env: { HELLO: 'hi!' } });