mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 10:54:49 +00:00
18 lines
502 B
TypeScript
18 lines
502 B
TypeScript
import { resolve } from 'pathe'
|
|
import { describe } from 'vitest'
|
|
import { startServer, setupTest, testNitroBehavior, importModule } from './_tests.js'
|
|
|
|
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
|
|
}
|
|
}
|
|
})
|
|
})
|