rsnext/test/development
Zack Tanner 333d3ad768
fix flakey HMR test (#63022)
The "Compiled" HMR log is emitted as follows:

> Compiled in 54ms

When running this string through the matcher, we get:
```
> const matches = "Compiled in 54ms".match(/Compiled.*? in ([\d.]{1,})\s?(?:s|ms)/i) 
console.log(matches[1]); // 54
```

We correctly assign `compileTime` to `matches[1]`. However, we then
assign `compileTimeMs` to `parseFloat(compileTime[1])`. This is
definitely an error, as `compileTime[1]` would be `4` in the above
example.

This means that if the compilation time takes less than a single digit
value, it'd be coerced to NaN.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-2757
2024-03-07 23:49:12 +00:00
..
acceptance fix dev overlay pseudo html collapsing (#62728) 2024-03-01 19:13:57 +01:00
acceptance-app fix dev overlay pseudo html collapsing (#62728) 2024-03-01 19:13:57 +01:00
api-cors-with-rewrite fix(#11930): rewritten api routes can correctly handle cors in dev mode (#38937) 2022-07-29 21:39:43 -05:00
app-dir [error overlay] move missing tags error inside error overlay (#62993) 2024-03-07 14:24:00 +01:00
app-hmr remove HMR polling in favor of more targeted events (#54406) 2023-08-23 16:25:57 -07:00
app-render-error-log Turbopack: Trace edge runtime app render errors through source maps (#62901) 2024-03-05 20:40:26 -08:00
basic fix flakey HMR test (#63022) 2024-03-07 23:49:12 +00:00
client-dev-overlay fix: error overlay hijacking application focus (safari) (#53693) 2023-08-08 21:45:03 +02:00
correct-tsconfig-defaults chore(test): fix flaky tsconfig.json test (#53132) 2023-07-24 14:33:55 -07:00
dotenv-default-expansion Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
duplicate-pages Remove extra duplicate pages warning (#60113) 2024-01-02 14:55:55 +01:00
experimental-https-server test(integration): fix --turbo tests fixture setup (#55293) 2023-09-18 17:46:07 +00:00
gssp-notfound Ensure next.url is used instead of next.appPort (#44163) 2022-12-19 13:29:50 -08:00
jsconfig-path-reloading Add hasRedbox fix (#60522) 2024-01-15 09:36:44 +01:00
middleware-errors Revert "refactor(analysis): rust based page-static-info, deprecate js parse interface in next-swc" (#62838) 2024-03-04 21:43:56 +00:00
middleware-warnings refactor tests for readability (#51051) 2023-06-21 19:47:21 +00:00
next-font Skip test that is also skipped in webpack (#61221) 2024-01-27 18:17:18 +01:00
pages-dir Fix Router Error Events in Shallow Routing by Skipping cancelHandler Creation (#61771) 2024-02-28 05:39:31 -08:00
project-directory-with-styled-jsx-suffix fix: allow user directory with styled-jsx prefix in next dev (#41484) 2022-10-19 19:01:48 +00:00
repeated-dev-edits refactor(tests): make chain more "correct" (#51728) 2024-02-14 20:14:24 +01:00
start-no-build fix: improve error when starting next without building (#62404) 2024-02-27 10:34:22 -08:00
tsconfig-path-reloading merge pages and app overlays (#60899) 2024-02-14 11:28:13 +01:00
typescript-auto-install Remove installCommand on typescript-auto-install and pnpm-support (#58039) 2023-11-05 18:32:10 +01:00
watch-config-file Logging improvements (#55298) 2023-09-13 15:27:02 +02:00
webpack-issuer-deprecation-warning More Turbopack fixes (#56275) 2023-10-02 09:42:32 +02:00