From b6b7f393ea0a49bd6efd642aec076ac40887900a Mon Sep 17 00:00:00 2001 From: ceifa Date: Sun, 29 Oct 2023 13:28:47 -0300 Subject: [PATCH] fix luatests on older node versions --- test/luatests.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/luatests.mjs b/test/luatests.mjs index d2ebdfd..3b08dd2 100644 --- a/test/luatests.mjs +++ b/test/luatests.mjs @@ -16,7 +16,8 @@ async function* walk(dir) { } const factory = new LuaFactory() -const filePath = fileURLToPath(import.meta.resolve('../lua/testes')) +const testsPath = import.meta.resolve('../lua/testes') +const filePath = fileURLToPath(typeof testsPath === 'string' ? testsPath : await Promise.resolve(testsPath)) for await (const file of walk(filePath)) { const relativeFile = file.replace(`${filePath}/`, '')