Skip to content

Commit 6748bd4

Browse files
committed
chore: fix test
1 parent cce9c0e commit 6748bd4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

packages/runtime/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ const plugin: NetlifyPlugin & { onPreDev?: OnPreBuild; onDev?: OnPreBuild } = {
204204
},
205205
}
206206
// The types haven't been updated yet
207-
const nextPlugin = (_inputs, meta: { events: Set<string> }): NetlifyPlugin & { onPreDev?: OnPreBuild } => {
207+
const nextRuntime = (_inputs, meta: { events?: Set<string> } = {}): NetlifyPlugin & { onPreDev?: OnPreBuild } => {
208208
if (!meta?.events?.has('onPreDev')) {
209209
return {
210210
...plugin,
@@ -223,6 +223,6 @@ const nextPlugin = (_inputs, meta: { events: Set<string> }): NetlifyPlugin & { o
223223
}
224224
}
225225

226-
module.exports = nextPlugin
226+
module.exports = nextRuntime
227227

228228
/* eslint-enable max-lines */

test/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ const cpy = require('cpy')
1414
const { dir: getTmpDir } = require('tmp-promise')
1515
const { downloadFile } = require('../packages/runtime/src/templates/handlerUtils')
1616

17-
const nextRuntime = require('../packages/runtime/src')
17+
const nextRuntimeFactory = require('../packages/runtime/src')
18+
const nextRuntime = nextRuntimeFactory({})
1819

1920
const { HANDLER_FUNCTION_NAME, ODB_FUNCTION_NAME, IMAGE_FUNCTION_NAME } = require('../packages/runtime/src/constants')
2021
const { join } = require('pathe')
@@ -33,8 +34,6 @@ const {
3334
} = require('../packages/runtime/src/helpers/config')
3435
const { dirname } = require('path')
3536
const { getProblematicUserRewrites } = require('../packages/runtime/src/helpers/verification')
36-
const { onPostBuild } = require('../packages/runtime/lib')
37-
const { basePath } = require('../demos/next-i18next/next.config')
3837

3938
const chance = new Chance()
4039
const FIXTURES_DIR = `${__dirname}/fixtures`

0 commit comments

Comments
 (0)