(optEnv = {}, opts?: any)
| 20 | let apiServer |
| 21 | |
| 22 | const startApiServer = async (optEnv = {}, opts?: any) => { |
| 23 | const scriptPath = join(appDir, 'api-server.js') |
| 24 | apiServerPort = await findPort() |
| 25 | const env = Object.assign( |
| 26 | { ...process.env }, |
| 27 | { PORT: `${apiServerPort}` }, |
| 28 | optEnv |
| 29 | ) |
| 30 | |
| 31 | apiServer = await initNextServerScript( |
| 32 | scriptPath, |
| 33 | /ready on/i, |
| 34 | env, |
| 35 | /ReferenceError: options is not defined/, |
| 36 | opts |
| 37 | ) |
| 38 | } |
| 39 | |
| 40 | function runTests() { |
| 41 | it('includes polyfilled fetch when using getStaticProps', async () => { |
no test coverage detected