From 46187cd528337d157b6b42b05140a66cbdc6f467 Mon Sep 17 00:00:00 2001 From: Edmund Miller Date: Mon, 14 Nov 2022 12:44:23 -0600 Subject: [PATCH] test: Add main test from template Doesn't work yet though --- test/main.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/main.ts diff --git a/test/main.ts b/test/main.ts new file mode 100644 index 0000000..53bdc21 --- /dev/null +++ b/test/main.ts @@ -0,0 +1,17 @@ +import test from 'ava' // eslint-disable-line import/no-unresolved +import * as cp from 'child_process' +import * as path from 'path' +import * as process from 'process' + +// eslint-disable-next-line ava/no-skip-test +test.skip('test runs', t => { + process.env['INPUT_VERSION'] = 'v22.10.2' + const np = process.execPath + const ip = path.join(__dirname, '..', 'lib', 'src', 'main.js') + const options: cp.ExecFileSyncOptions = { + env: process.env + } + // eslint-disable-next-line no-console + console.log(cp.execFileSync(np, [ip], options).toString()) + t.pass() +})