mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
18 lines
483 B
TypeScript
18 lines
483 B
TypeScript
|
import { resolve } from 'path'
|
||
|
import { testNitroBuild, startServer, setupTest, testNitroBehavior } from './_utils'
|
||
|
|
||
|
describe('nitro:preset:node', () => {
|
||
|
const ctx = setupTest()
|
||
|
testNitroBuild(ctx, 'node')
|
||
|
testNitroBehavior(ctx, async () => {
|
||
|
const { handle } = await import(resolve(ctx.outDir, 'server/index.js'))
|
||
|
await startServer(ctx, handle)
|
||
|
return async ({ url }) => {
|
||
|
const data = await ctx.fetch(url)
|
||
|
return {
|
||
|
data
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
})
|