Skip to content

Commit 9c06657

Browse files
chore: use edge functions bootstrap package in tests (#6588)
1 parent 9a25819 commit 9c06657

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/edge-bundler/node/server/server.test.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ import { readFile } from 'fs/promises'
33
import { join } from 'path'
44
import process from 'process'
55

6+
// @ts-expect-error TypeScript is complaining about the values for the `module`
7+
// and `moduleResolution` configuration properties, but changing those to more
8+
// modern values causes other packages to fail. Leaving this for now, but we
9+
// should have a proper fix for this.
10+
import { getURL as getBootstrapURL } from '@netlify/edge-functions-bootstrap/version'
611
import getPort from 'get-port'
712
import tmp from 'tmp-promise'
813
import { v4 as uuidv4 } from 'uuid'
@@ -22,7 +27,7 @@ test('Starts a server and serves requests for edge functions', async () => {
2227
const servePath = join(basePath, '.netlify', 'edge-functions-serve')
2328
const server = await serve({
2429
basePath,
25-
bootstrapURL: 'https://edge.netlify.com/bootstrap/index-combined.ts',
30+
bootstrapURL: await getBootstrapURL(),
2631
port,
2732
servePath,
2833
})
@@ -119,7 +124,7 @@ test('Serves edge functions in a monorepo setup', async () => {
119124
const servePath = join(basePath, '.netlify', 'edge-functions-serve')
120125
const server = await serve({
121126
basePath,
122-
bootstrapURL: 'https://edge.netlify.com/bootstrap/index-combined.ts',
127+
bootstrapURL: await getBootstrapURL(),
123128
port,
124129
rootPath,
125130
servePath,

packages/edge-bundler/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"test": "test/node"
4343
},
4444
"devDependencies": {
45+
"@netlify/edge-functions-bootstrap": "^2.14.0",
4546
"@types/node": "^18.19.111",
4647
"@types/semver": "^7.3.9",
4748
"@types/uuid": "^10.0.0",

0 commit comments

Comments
 (0)