diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index efcf95e..62ac756 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -19,9 +19,10 @@ test('wait 500 ms', async () => { // shows how the runner will run a javascript action with env / stdout protocol test('test runs', () => { process.env['INPUT_MILLISECONDS'] = '500' + const np = process.execPath const ip = path.join(__dirname, '..', 'lib', 'main.js') - const options: cp.ExecSyncOptions = { + const options: cp.ExecFileSyncOptions = { env: process.env } - console.log(cp.execSync(`node ${ip}`, options).toString()) + console.log(cp.execFileSync(np, [ip], options).toString()) })