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