From 019f99d6bbc4903703fd132d1bfb3e953e5bc668 Mon Sep 17 00:00:00 2001 From: Markus Olsson Date: Wed, 20 Nov 2024 15:07:53 +0100 Subject: [PATCH] :art: cleanup --- script/test.mjs | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/script/test.mjs b/script/test.mjs index b3eeb14..e425f75 100644 --- a/script/test.mjs +++ b/script/test.mjs @@ -23,13 +23,8 @@ const testReporterArgs = process.env.GITHUB_ACTIONS ] : specTestReporterArgs -spawn('node', ['--import', 'tsx', ...testReporterArgs, '--test', ...files], { - stdio: 'inherit', - env: { - ...process.env, - LOCAL_GIT_DIRECTORY: resolve( - dirname(fileURLToPath(import.meta.url)), - '../git/' - ), - }, -}).on('exit', process.exit) +const scriptsDir = dirname(fileURLToPath(import.meta.url)) +process.env.LOCAL_GIT_DIRECTORY = resolve(scriptsDir, '../git/') +const args = ['--import', 'tsx', ...testReporterArgs, '--test', ...files] + +spawn('node', args, { stdio: 'inherit' }).on('exit', process.exit)