mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 17:43:59 +00:00
18 lines
484 B
TypeScript
18 lines
484 B
TypeScript
import { resolve } from 'upath'
|
|
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
|
|
}
|
|
}
|
|
})
|
|
})
|