(optEnv = {}, opts?: any)
| 36 | : undefined |
| 37 | |
| 38 | const startServer = async (optEnv = {}, opts?: any) => { |
| 39 | const scriptPath = join(appDir, 'server.js') |
| 40 | context.appPort = appPort = await getPort() |
| 41 | nextUrl = `http${useHttps ? 's' : ''}://localhost:${context.appPort}` |
| 42 | |
| 43 | const env = Object.assign( |
| 44 | { ...process.env }, |
| 45 | { PORT: `${appPort}`, __NEXT_TEST_MODE: 'true', USE_HTTPS: useHttps }, |
| 46 | optEnv |
| 47 | ) |
| 48 | |
| 49 | server = await initNextServerScript( |
| 50 | scriptPath, |
| 51 | /ready on/i, |
| 52 | env, |
| 53 | /ReferenceError: options is not defined/, |
| 54 | opts |
| 55 | ) |
| 56 | } |
| 57 | |
| 58 | describe('with dynamic assetPrefix', () => { |
| 59 | beforeAll(() => startServer()) |
no test coverage detected