From 6111845e111f03a027c2fec6cbc15c1ad5547f8c Mon Sep 17 00:00:00 2001
From: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date: Tue, 12 Sep 2023 23:35:32 -0700
Subject: [PATCH] test(next-dev): clean up 404 tests (#55292)
### What?
Previous change migrated 404 tests https://github.com/vercel/next.js/blob/canary/test/turbopack-tests-manifest.js#L112-L115 from next.js.
Closes WEB-1542
---
.../next/app/404-custom/input/app/layout.tsx | 7 --
.../input/app/link-segment/page.tsx | 14 ---
.../app/404-custom/input/app/link/page.tsx | 14 ---
.../app/404-custom/input/app/not-found.tsx | 3 -
.../next/app/404-custom/input/app/page.tsx | 5 -
.../input/app/segment/not-found.tsx | 3 -
.../app/404-custom/input/app/segment/page.tsx | 5 -
.../next/app/404-custom/input/app/test.tsx | 112 ------------------
...File(__q____q____q____star__0__-79ac62.txt | 15 ---
...File(__q____q____q____star__0__-b1b1c4.txt | 15 ---
...FileSync(__q____q____q____star_-4ef8e2.txt | 15 ---
...FileSync(__q____q____q____star_-c3fa50.txt | 15 ---
...(__q____q____q____star__0__star-cc5e88.txt | 14 ---
...(__q____q____q____star__0__star-f6a046.txt | 14 ---
.../next/app/404-default/input/app/layout.tsx | 7 --
.../app/404-default/input/app/link/page.tsx | 15 ---
.../next/app/404-default/input/app/page.tsx | 5 -
.../next/app/404-default/input/app/test.tsx | 62 ----------
...File(__q____q____q____star__0__-846a98.txt | 15 ---
...File(__q____q____q____star__0__-9122b6.txt | 15 ---
...FileSync(__q____q____q____star_-a68423.txt | 15 ---
...FileSync(__q____q____q____star_-bce93f.txt | 15 ---
...(__q____q____q____star__0__star-172a6c.txt | 14 ---
...(__q____q____q____star__0__star-6538fc.txt | 14 ---
24 files changed, 428 deletions(-)
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/layout.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link-segment/page.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link/page.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/not-found.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/page.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/not-found.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/page.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/test.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-79ac62.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-b1b1c4.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-4ef8e2.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-c3fa50.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-cc5e88.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-f6a046.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/layout.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/link/page.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/page.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/test.tsx
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-846a98.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-9122b6.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-a68423.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-bce93f.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-172a6c.txt
delete mode 100644 packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-6538fc.txt
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/layout.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/layout.tsx
deleted file mode 100644
index 12c84680889be..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/layout.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-export default function RootLayout({ children }: { children: any }) {
- return (
-
-
{children}
-
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link-segment/page.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link-segment/page.tsx
deleted file mode 100644
index e70deb9e207fc..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link-segment/page.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client'
-
-import Link from 'next/link'
-import { useTestHarness } from '@turbo/pack-test-harness'
-
-export default function Page() {
- useTestHarness((mod) => mod.markAsHydrated())
-
- return (
-
- -> Segment not found
-
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link/page.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link/page.tsx
deleted file mode 100644
index 7e831f7838735..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/link/page.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-'use client'
-
-import Link from 'next/link'
-import { useTestHarness } from '@turbo/pack-test-harness'
-
-export default function Page() {
- useTestHarness((mod) => mod.markAsHydrated())
-
- return (
-
- -> Not found
-
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/not-found.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/not-found.tsx
deleted file mode 100644
index ba6deda1a014f..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/not-found.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function NotFound() {
- return Custom not found
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/page.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/page.tsx
deleted file mode 100644
index 373bf2633967c..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import Test from './test'
-
-export default function Page() {
- return
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/not-found.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/not-found.tsx
deleted file mode 100644
index 464c918dc5307..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/not-found.tsx
+++ /dev/null
@@ -1,3 +0,0 @@
-export default function SegmentNotFound() {
- return Segment Not Found
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/page.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/page.tsx
deleted file mode 100644
index 0c66f3714c95b..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/segment/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { notFound } from 'next/navigation'
-
-export default function SegmentPage() {
- notFound()
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/test.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/test.tsx
deleted file mode 100644
index 6b3079b778cda..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/input/app/test.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-'use client'
-
-import { useRef } from 'react'
-import { useTestHarness, Harness } from '@turbo/pack-test-harness'
-
-export default function Test() {
- const iframeRef = useRef(null)
-
- useTestHarness((harness) => runTests(harness, iframeRef.current!))
-
- return
-}
-
-function runTests(harness: Harness, iframe: HTMLIFrameElement) {
- // These tests requires a longer timeout because we're rendering the 404 page as well.
- const TIMEOUT = 20000
- const LONG_TIMEOUT = 60000
-
- it(
- 'returns a 404 status code for the custom 404 page',
- async () => {
- const res = await fetch('/not-found')
- expect(res.status).toBe(404)
- },
- TIMEOUT
- )
-
- // TODO(NEXT-963) Fix this test once Next.js 404 page routing is fixed.
- it.skip(
- 'navigates to the custom 404 page',
- async () => {
- await harness.load(iframe, '/link')
- await harness.waitForHydration(iframe, '/link')
-
- const link = iframe.contentDocument!.querySelector('a[data-test-link]')
- expect(link).not.toBeNull()
- expect(link!).toBeInstanceOf(
- (iframe.contentWindow as any).HTMLAnchorElement
- )
- ;(link as HTMLAnchorElement).click()
-
- await harness.waitForHydration(iframe, '/not-found')
-
- expect(
- iframe.contentDocument!.querySelector('[data-test-notfound]')
- ).not.toBeNull()
- },
- TIMEOUT
- )
-
- // TODO: This test is flaky, so it needs a particularly long timeout.
- // TODO(WEB-980) Fix this test once we no longer throw an error when rendering a 404 page.
- it.skip(
- 'renders a custom 404 page',
- async () => {
- await harness.load(iframe, '/not-found')
- await harness.waitForSelector(iframe, '[data-test-notfound]')
-
- expect(
- iframe.contentDocument!.querySelector('[data-test-notfound]')
- ).not.toBeNull()
- },
- LONG_TIMEOUT
- )
-
- // TODO: This test is flaky, so it needs a particularly long timeout.
- it(
- 'returns a 404 status code for a segment 404 page',
- async () => {
- const res = await fetch('/segment')
- expect(res.status).toBe(404)
- },
- LONG_TIMEOUT
- )
-
- // TODO(WEB-980) Fix this test once we no longer throw an error when rendering a 404 page.
- it.skip(
- 'navigates to the segment 404 page',
- async () => {
- await harness.load(iframe, '/link-segment')
- await harness.waitForHydration(iframe, '/link-segment')
-
- const link = iframe.contentDocument!.querySelector('a[data-test-link]')
- expect(link).not.toBeNull()
- expect(link!).toBeInstanceOf(
- (iframe.contentWindow as any).HTMLAnchorElement
- )
- ;(link as HTMLAnchorElement).click()
-
- await harness.waitForHydration(iframe, '/segment')
-
- expect(
- iframe.contentDocument!.querySelector('[data-test-segmentnotfound]')
- ).not.toBeNull()
- },
- TIMEOUT
- )
-
- // TODO(WEB-980) Fix this test once we no longer throw an error when rendering a 404 page.
- it.skip(
- 'renders a segment 404 page',
- async () => {
- await harness.load(iframe, '/segment')
- await harness.waitForSelector(iframe, '[data-test-segmentnotfound]')
-
- expect(
- iframe.contentDocument!.querySelector('[data-test-segmentnotfound]')
- ).not.toBeNull()
- },
- TIMEOUT
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-79ac62.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-79ac62.txt
deleted file mode 100644
index cb668aa67930e..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-79ac62.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:18:19 lint TP1004 fs.readFile(???*0*) is very dynamic
- 14 | default: obj
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- + v
- 18 + readFile: (f)=>_fs.default.promises.readFile(f),
- + ^
- 19 | readFileSync: (f)=>_fs.default.readFileSync(f),
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-b1b1c4.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-b1b1c4.txt
deleted file mode 100644
index cb668aa67930e..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-b1b1c4.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:18:19 lint TP1004 fs.readFile(???*0*) is very dynamic
- 14 | default: obj
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- + v
- 18 + readFile: (f)=>_fs.default.promises.readFile(f),
- + ^
- 19 | readFileSync: (f)=>_fs.default.readFileSync(f),
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-4ef8e2.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-4ef8e2.txt
deleted file mode 100644
index e7d760c7e4242..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-4ef8e2.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:19:23 lint TP1004 fs.readFileSync(???*0*) is very dynamic
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- 18 | readFile: (f)=>_fs.default.promises.readFile(f),
- + v
- 19 + readFileSync: (f)=>_fs.default.readFileSync(f),
- + ^
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-c3fa50.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-c3fa50.txt
deleted file mode 100644
index e7d760c7e4242..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-c3fa50.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:19:23 lint TP1004 fs.readFileSync(???*0*) is very dynamic
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- 18 | readFile: (f)=>_fs.default.promises.readFile(f),
- + v
- 19 + readFileSync: (f)=>_fs.default.readFileSync(f),
- + ^
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-cc5e88.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-cc5e88.txt
deleted file mode 100644
index 0d33591b07a5f..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-cc5e88.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:24:15 lint TP1004 fs.stat(???*0*) is very dynamic
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
- + v
- 24 + stat: (f)=>_fs.default.promises.stat(f)
- + ^
- 25 | };
- 26 |
- 27 | //# sourceMappingURL=node-fs-methods.js.map
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-f6a046.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-f6a046.txt
deleted file mode 100644
index 0d33591b07a5f..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-custom/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-f6a046.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:24:15 lint TP1004 fs.stat(???*0*) is very dynamic
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
- + v
- 24 + stat: (f)=>_fs.default.promises.stat(f)
- + ^
- 25 | };
- 26 |
- 27 | //# sourceMappingURL=node-fs-methods.js.map
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/layout.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/layout.tsx
deleted file mode 100644
index 12c84680889be..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/layout.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-export default function RootLayout({ children }: { children: any }) {
- return (
-
- {children}
-
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/link/page.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/link/page.tsx
deleted file mode 100644
index 2f703f0e82f2c..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/link/page.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-'use client'
-
-import Link from 'next/link'
-import { useEffect } from 'react'
-import { useTestHarness } from '@turbo/pack-test-harness'
-
-export default function Page() {
- useTestHarness((mod) => mod.markAsHydrated())
-
- return (
-
- -> Not found
-
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/page.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/page.tsx
deleted file mode 100644
index 373bf2633967c..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/page.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import Test from './test'
-
-export default function Page() {
- return
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/test.tsx b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/test.tsx
deleted file mode 100644
index c355dfaa5138a..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/input/app/test.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-'use client'
-
-import { useRef } from 'react'
-import { useTestHarness, Harness } from '@turbo/pack-test-harness'
-
-export default function Test() {
- const iframeRef = useRef(null)
-
- useTestHarness((harness) => runTests(harness, iframeRef.current!))
-
- return
-}
-
-function runTests(harness: Harness, iframe: HTMLIFrameElement) {
- // These tests requires a longer timeout because we're rendering the 404 page as well.
- const TIMEOUT = 20000
-
- it(
- 'returns a 404 status code',
- async () => {
- const res = await fetch('/not-found')
- expect(res.status).toBe(404)
- },
- TIMEOUT
- )
-
- // TODO(NEXT-963) Fix this test once Next.js 404 page routing is fixed.
- it.skip(
- 'navigates to the default 404 page',
- async () => {
- await harness.load(iframe, '/link')
- await harness.waitForHydration(iframe, '/link')
-
- const link = iframe.contentDocument!.querySelector('a[data-test-link]')
- expect(link).not.toBeNull()
- expect(link!).toBeInstanceOf(
- (iframe.contentWindow as any).HTMLAnchorElement
- )
- ;(link as HTMLAnchorElement).click()
-
- await harness.waitForHydration(iframe, '/not-found')
-
- expect(
- iframe.contentDocument!.querySelector('.next-error-h1')
- ).not.toBeNull()
- },
- TIMEOUT
- )
-
- it(
- 'renders the default 404 page',
- async () => {
- await harness.load(iframe, '/not-found')
- await harness.waitForSelector(iframe, '.next-error-h1')
-
- expect(
- iframe.contentDocument!.querySelector('.next-error-h1')
- ).not.toBeNull()
- },
- TIMEOUT
- )
-}
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-846a98.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-846a98.txt
deleted file mode 100644
index cb668aa67930e..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-846a98.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:18:19 lint TP1004 fs.readFile(???*0*) is very dynamic
- 14 | default: obj
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- + v
- 18 + readFile: (f)=>_fs.default.promises.readFile(f),
- + ^
- 19 | readFileSync: (f)=>_fs.default.readFileSync(f),
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-9122b6.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-9122b6.txt
deleted file mode 100644
index cb668aa67930e..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFile(__q____q____q____star__0__-9122b6.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:18:19 lint TP1004 fs.readFile(???*0*) is very dynamic
- 14 | default: obj
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- + v
- 18 + readFile: (f)=>_fs.default.promises.readFile(f),
- + ^
- 19 | readFileSync: (f)=>_fs.default.readFileSync(f),
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-a68423.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-a68423.txt
deleted file mode 100644
index e7d760c7e4242..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-a68423.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:19:23 lint TP1004 fs.readFileSync(???*0*) is very dynamic
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- 18 | readFile: (f)=>_fs.default.promises.readFile(f),
- + v
- 19 + readFileSync: (f)=>_fs.default.readFileSync(f),
- + ^
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-bce93f.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-bce93f.txt
deleted file mode 100644
index e7d760c7e4242..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.readFileSync(__q____q____q____star_-bce93f.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:19:23 lint TP1004 fs.readFileSync(???*0*) is very dynamic
- 15 | };
- 16 | }
- 17 | const nodeFs = {
- 18 | readFile: (f)=>_fs.default.promises.readFile(f),
- + v
- 19 + readFileSync: (f)=>_fs.default.readFileSync(f),
- + ^
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-172a6c.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-172a6c.txt
deleted file mode 100644
index 0d33591b07a5f..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-172a6c.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:24:15 lint TP1004 fs.stat(???*0*) is very dynamic
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
- + v
- 24 + stat: (f)=>_fs.default.promises.stat(f)
- + ^
- 25 | };
- 26 |
- 27 | //# sourceMappingURL=node-fs-methods.js.map
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file
diff --git a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-6538fc.txt b/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-6538fc.txt
deleted file mode 100644
index 0d33591b07a5f..0000000000000
--- a/packages/next-swc/crates/next-dev-tests/tests/integration/next/app/404-default/issues/lint TP1004 fs.stat(__q____q____q____star__0__star-6538fc.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-warning - [parse] [project]/packages/next/dist/server/lib/node-fs-methods.js /packages/next/dist/server/lib/node-fs-methods.js:24:15 lint TP1004 fs.stat(???*0*) is very dynamic
- 20 | writeFile: (f, d)=>_fs.default.promises.writeFile(f, d),
- 21 | mkdir: (dir)=>_fs.default.promises.mkdir(dir, {
- 22 | recursive: true
- 23 | }),
- + v
- 24 + stat: (f)=>_fs.default.promises.stat(f)
- + ^
- 25 | };
- 26 |
- 27 | //# sourceMappingURL=node-fs-methods.js.map
-
- - *0* f
- ⚠️ pattern without value
\ No newline at end of file