Unverified Commit c3d5b927 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

[test] Move the dev-only `use cache` test suite to `test/development` (#96023)

The `use-cache-dev` suite only covers dev-mode HMR behavior of `use
cache`, so it belongs under `test/development/app-dir` alongside the
other `cache-components-dev-*` suites rather than in `test/e2e`. Because
`test/development` runs only in dev mode and is never deployed, the
production-mode placeholder guard, the `skipDeployment` option, and the
`if (skipped)` early return are all dropped. The three test manifests
that referenced the old path are updated.


---

<sub>Stack created with <a
href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a
href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>
parent 286862e3
...@@ -286,7 +286,7 @@ ...@@ -286,7 +286,7 @@
"test/e2e/app-dir/unstable-rethrow/unstable-rethrow.test.ts", "test/e2e/app-dir/unstable-rethrow/unstable-rethrow.test.ts",
"test/e2e/app-dir/use-cache-close-over-function/**/*", "test/e2e/app-dir/use-cache-close-over-function/**/*",
"test/e2e/app-dir/use-cache-custom-handler/**/*", "test/e2e/app-dir/use-cache-custom-handler/**/*",
"test/e2e/app-dir/use-cache-dev/use-cache-dev.test.ts", "test/development/app-dir/use-cache-dev/use-cache-dev.test.ts",
"test/e2e/app-dir/use-cache-hanging-inputs/**/*", "test/e2e/app-dir/use-cache-hanging-inputs/**/*",
"test/e2e/app-dir/use-cache-metadata-route-handler/**/*", "test/e2e/app-dir/use-cache-metadata-route-handler/**/*",
"test/e2e/app-dir/use-cache-route-handler-only/**/*", "test/e2e/app-dir/use-cache-route-handler-only/**/*",
......
...@@ -2,26 +2,10 @@ import { nextTestSetup } from 'e2e-utils' ...@@ -2,26 +2,10 @@ import { nextTestSetup } from 'e2e-utils'
import { retry } from 'next-test-utils' import { retry } from 'next-test-utils'
describe('use-cache-dev', () => { describe('use-cache-dev', () => {
const { next, skipped, isNextStart, isTurbopack } = nextTestSetup({ const { next, isTurbopack } = nextTestSetup({
files: __dirname, files: __dirname,
skipDeployment: true,
}) })
if (skipped) {
return
}
if (isNextStart) {
// Every test below is dev-only now that the HMR refresh hash is sourced on
// the server instead of a client cookie (the removed "next start" cookie
// test was the only non-dev case). This placeholder keeps the suite from
// being empty in non-dev modes. TODO: Move this whole suite to
// `test/development/app-dir/use-cache-dev` (a dev-only location) in a
// separate PR, and delete this placeholder. It's kept separate to keep this
// PR's diff readable.
return it('has no production-mode assertions', () => {})
}
it('should update cached data after editing a file', async () => { it('should update cached data after editing a file', async () => {
const browser = await next.browser('/') const browser = await next.browser('/')
......
...@@ -8217,7 +8217,7 @@ ...@@ -8217,7 +8217,7 @@
"flakey": [], "flakey": [],
"runtimeError": false "runtimeError": false
}, },
"test/e2e/app-dir/use-cache-dev/use-cache-dev.test.ts": { "test/development/app-dir/use-cache-dev/use-cache-dev.test.ts": {
"passed": [ "passed": [
"use-cache-dev should ignore an existing HMR refresh hash cookie with \"next start\"" "use-cache-dev should ignore an existing HMR refresh hash cookie with \"next start\""
], ],
...@@ -10652,7 +10652,7 @@ ...@@ -10652,7 +10652,7 @@
"flakey": [], "flakey": [],
"runtimeError": false "runtimeError": false
}, },
"test/e2e/app-dir/use-cache-dev/use-cache-dev.test.ts": { "test/development/app-dir/use-cache-dev/use-cache-dev.test.ts": {
"passed": [ "passed": [
"use-cache-dev should handle edits on nested pages", "use-cache-dev should handle edits on nested pages",
"use-cache-dev should return cached data after reload", "use-cache-dev should return cached data after reload",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment