silverwolf-x/project / test /e2e /app-dir /app-middleware-proxy /app-middleware-proxy-without-pages-dir.test.ts
silverwolf-x's picture
download
raw
721 Bytes
/* eslint-env jest */
import path from 'path'
import { nextTestSetup, FileRef } from 'e2e-utils'
describe('app dir - proxy without pages dir', () => {
const { next } = nextTestSetup({
files: {
app: new FileRef(path.join(__dirname, 'app')),
'next.config.js': new FileRef(path.join(__dirname, 'next.config.js')),
'proxy.js': `
import { NextResponse } from 'next/server'
export async function proxy(request) {
return new NextResponse('redirected')
}
export const config = {
matcher: '/headers'
}
`,
},
})
it('Updates headers', async () => {
const html = await next.render('/headers')
expect(html).toContain('redirected')
})
})

Xet Storage Details

Size:
721 Bytes
·
Xet hash:
0ff232b2d66f039c1d336aee26873bff6bf0b237a962ee09e1c0327b4a5f8cd2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.