Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
chore: remove unneeded v16 test
Browse files Browse the repository at this point in the history
this test was added as a very specific reproduction case, but since
was superceded by two more general tests.
Removed in a follow-up to #806.
  • Loading branch information
netlify-team-account-1 committed Nov 15, 2021
1 parent c1820a4 commit 32babde
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
5 changes: 0 additions & 5 deletions tests/fixtures/node-force-builtin-v16/function.js

This file was deleted.

29 changes: 0 additions & 29 deletions tests/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2250,35 +2250,6 @@ testMany(
},
)

testMany(
'Handles built-in module added in v16 required with the `node:` prefix',
['bundler_default', 'bundler_default_nft', 'bundler_nft', 'bundler_esbuild', 'bundler_esbuild_zisi'],
async (options, t) => {
t.plan(3)
const { tmpDir, files } = await zipFixture(t, 'node-force-builtin-v16', {
opts: { config: { '*': { ...options } } },
})

await unzipFiles(files)

if (semver.satisfies(nodeVersion, '>=16')) {
const func = require(`${tmpDir}/function`)
t.true(func())
} else {
try {
require(`${tmpDir}/function`)
} catch (error) {
t.is(
error.message,
semver.satisfies(nodeVersion, '>10')
? 'No such built-in module: node:stream/web'
: "Cannot find module 'node:stream/web'",
)
}
}
},
)

testMany(
'Handles built-in modules imported with the `node:` prefix',
['bundler_default', 'bundler_default_nft', 'bundler_nft', 'bundler_esbuild', 'bundler_esbuild_zisi'],
Expand Down

0 comments on commit 32babde

Please sign in to comment.