1'use strict'; 2 3const { Worker } = require('worker_threads'); 4const path = require('path'); 5const max_snapshots = parseInt(process.env.TEST_SNAPSHOTS) || 1; 6new Worker(path.join(__dirname, 'grow.js'), { 7 execArgv: [ 8 `--heapsnapshot-near-heap-limit=${max_snapshots}`, 9 ], 10 resourceLimits: { 11 maxOldGenerationSizeMb: 12 parseInt(process.env.TEST_OLD_SPACE_SIZE) || 20 13 } 14}); 15