mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 16:43:55 +00:00
19 lines
547 B
TypeScript
19 lines
547 B
TypeScript
import { resolve } from 'pathe'
|
|
import { describe } from 'vitest'
|
|
import { setupTest, startServer, testNitroBehavior, importModule } from './_tests'
|
|
|
|
describe('nitro:preset:vercel', () => {
|
|
const ctx = setupTest('vercel')
|
|
testNitroBehavior(ctx, async () => {
|
|
const handle = await importModule(resolve(ctx.outDir, 'functions/node/server/index.mjs'))
|
|
.then(r => r.default || r)
|
|
await startServer(ctx, handle)
|
|
return async ({ url }) => {
|
|
const data = await ctx.fetch(url)
|
|
return {
|
|
data
|
|
}
|
|
}
|
|
})
|
|
})
|