From 4fcd2c190c0aee5272029128b3b5b7e7363548a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Bou=C3=A7as?= Date: Thu, 15 Sep 2022 12:28:55 +0100 Subject: [PATCH] chore: run stage 2 in Deno --- test/node/stage_2.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/test/node/stage_2.ts b/test/node/stage_2.ts index 7586d2e0..17428fd1 100644 --- a/test/node/stage_2.ts +++ b/test/node/stage_2.ts @@ -51,17 +51,7 @@ test('`getLocalEntryPoint` returns a valid stage 2 file for local development', await fs.writeFile(stage2Path, stage2) - // In Node <14, we're not able to actually load the stage 2 because ESM is - // not supported. The best we can do is to naively look for some assignments. - if (semver.lt(process.version.slice(1), '14.0.0')) { - for (const func of functions) { - t.true(stage2.includes(`metadata["${func.name}"] = {"url":"${pathToFileURL(func.path).toString()}"}`)) - } - - return - } - - const { stdout, stderr } = await execa('node', [stage2Path]) + const { stdout, stderr } = await execa('deno', ['run', '--allow-all', stage2Path]) t.is(stderr, '')