mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-25 15:15:19 +00:00
19 lines
531 B
TypeScript
19 lines
531 B
TypeScript
import { resolve } from 'path'
|
|
import { testNitroBuild, setupTest, startServer, testNitroBehavior } from './_utils'
|
|
|
|
describe('nitro:preset:vercel', () => {
|
|
const ctx = setupTest()
|
|
testNitroBuild(ctx, 'vercel')
|
|
testNitroBehavior(ctx, async () => {
|
|
const handle = await import(resolve(ctx.outDir, 'functions/node/server/index.js'))
|
|
.then(r => r.default || r)
|
|
await startServer(ctx, handle)
|
|
return async ({ url }) => {
|
|
const data = await ctx.fetch(url)
|
|
return {
|
|
data
|
|
}
|
|
}
|
|
})
|
|
})
|