mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 07:05:11 +00:00
6318438415
Co-authored-by: Daniel Roe <daniel@roe.dev>
17 lines
468 B
JavaScript
17 lines
468 B
JavaScript
import { resolve } from 'path'
|
|
import { startServer, setupTest, testNitroBehavior, importModule } from './_tests.mjs'
|
|
|
|
describe('nitro:preset:node', () => {
|
|
const ctx = setupTest('node')
|
|
testNitroBehavior(ctx, async () => {
|
|
const { handle } = await importModule(resolve(ctx.outDir, 'server/index.mjs'))
|
|
await startServer(ctx, handle)
|
|
return async ({ url }) => {
|
|
const data = await ctx.fetch(url)
|
|
return {
|
|
data
|
|
}
|
|
}
|
|
})
|
|
})
|