Buckets:
silverwolf-x/project / test /e2e /app-dir /app-middleware-proxy /app-middleware-proxy-in-src-dir.test.ts
| /* eslint-env jest */ | |
| import path from 'path' | |
| import { nextTestSetup, FileRef } from 'e2e-utils' | |
| describe('app dir - with proxy in src dir', () => { | |
| const { next } = nextTestSetup({ | |
| files: { | |
| 'src/app': new FileRef(path.join(__dirname, 'app')), | |
| 'next.config.js': new FileRef(path.join(__dirname, 'next.config.js')), | |
| 'src/proxy.js': ` | |
| import { NextResponse } from 'next/server' | |
| import { cookies } from 'next/headers' | |
| export async function proxy(request) { | |
| const cookie = (await cookies()).get('test-cookie') | |
| return NextResponse.json({ cookie }) | |
| } | |
| `, | |
| }, | |
| }) | |
| it('works without crashing when using RequestStore', async () => { | |
| const browser = await next.browser('/') | |
| await browser.addCookie({ | |
| name: 'test-cookie', | |
| value: 'test-cookie-response', | |
| }) | |
| await browser.refresh() | |
| const html = await browser.eval('document.documentElement.innerHTML') | |
| expect(html).toContain('test-cookie-response') | |
| }) | |
| }) | |
Xet Storage Details
- Size:
- 1.01 kB
- Xet hash:
- 5e3da8e0a89134fcd3f7e9393e3855b12def521de97c9d1351cbb8c8f21ae87b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.