Skip to content

Commit

Permalink
chore: run stage 2 in Deno
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardoboucas committed Sep 15, 2022
1 parent 2481e5f commit 4fcd2c1
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions test/node/stage_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, '')

Expand Down

0 comments on commit 4fcd2c1

Please sign in to comment.