From 0ada37eab7622392dc74079583ae4f4f7ebc5177 Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Wed, 24 May 2023 00:19:22 +0200 Subject: [PATCH] Modernize tests --- __tests__/main.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts index c5ed8517..aef03a82 100644 --- a/__tests__/main.test.ts +++ b/__tests__/main.test.ts @@ -17,7 +17,7 @@ beforeAll(async () => { {cwd: tmpdir} ) fs.chmodSync(`${tmpdir}/proxyboi-linux-amd64`, '755') - process.env['INPUT_FILE'] = `${tmpdir}/proxyboi-linux-amd64` + process.env['INPUT_FILES'] = `${tmpdir}/proxyboi-linux-amd64` } else if (os.type() == 'Darwin') { await exec.exec( 'curl', @@ -28,7 +28,7 @@ beforeAll(async () => { {cwd: tmpdir} ) fs.chmodSync(`${tmpdir}/proxyboi-macos-amd64`, '755') - process.env['INPUT_FILE'] = `${tmpdir}/proxyboi-macos-amd64` + process.env['INPUT_FILES'] = `${tmpdir}/proxyboi-macos-amd64` } else if (os.type() == 'Windows_NT') { await exec.exec( 'curl', @@ -38,13 +38,13 @@ beforeAll(async () => { ], {cwd: tmpdir} ) - process.env['INPUT_FILE'] = `${tmpdir}/proxyboi-windows-amd64.exe` + process.env['INPUT_FILES'] = `${tmpdir}/proxyboi-windows-amd64.exe` } }) describe('UPX Action', () => { it('can compress stuff', async () => { - const file_path = process.env['INPUT_FILE'] as string + const file_path = process.env['INPUT_FILES'] as string const old_size = fs.statSync(file_path).size await run() const new_size = fs.statSync(file_path).size