rsnext/test/lib
Will Binns-Smith 643447ed03
Allow port 0 in next dev and next start (#40118)
This addresses a bug where invoking `next dev` or `next start` with `--port 0` would fall back to the default port of 3000 instead of binding to port 0 (which typically results in the operating system assigning a free port).

I couldn't find a straightforward way of adding a test for next-start. It looks like we could add a similar test as for dev, but would need to generate a built project to serve. 

Manual test plan for `next start`:
```
$ ./packages/next/dist/bin/next start --port 0
ready - started server on 0.0.0.0:53508, url: http://localhost:53508
```

## Bug

- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [ ] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Co-authored-by: Wyatt Johnson <accounts+github@wyattjoh.ca>
2022-08-31 17:13:39 -05:00
..
browsers Update image tests files from *.js to *.ts (#39663) 2022-08-16 23:29:55 +00:00
next-modes Allow port 0 in next dev and next start (#40118) 2022-08-31 17:13:39 -05:00
amp-test-utils.js Improve linting rules to catch more errors (#9374) 2019-11-10 19:24:53 -08:00
create-next-install.js Update tests to use random directory (#39230) 2022-08-01 19:05:48 +00:00
e2e-utils.ts Allow passing FileRef directly to createNext (#37664) 2022-06-13 15:28:34 -05:00
flat-map-polyfill.js Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
mocks-require-hook.js Validate streaming writer chunk type in testing (#36200) 2022-04-18 16:24:06 +02:00
next-test-utils.js fix(next-server): Fix priority for edge routes (#39462) 2022-08-16 19:05:03 +01:00
next-webdriver.ts Update image tests files from *.js to *.ts (#39663) 2022-08-16 23:29:55 +00:00
react-channel-require-hook.js Alias react and react-dom by default (#38245) 2022-07-01 23:57:45 +00:00