Skip to content

Commit

Permalink
fix luatests on older node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
ceifa committed Oct 29, 2023
1 parent 111e9e6 commit b6b7f39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/luatests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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}/`, '')
Expand Down

0 comments on commit b6b7f39

Please sign in to comment.