diff --git a/integration/flat-routes-test.ts b/integration/flat-routes-test.ts index f7c6ba13e52..8af9c20038e 100644 --- a/integration/flat-routes-test.ts +++ b/integration/flat-routes-test.ts @@ -5,7 +5,6 @@ import { PlaywrightFixture } from "./helpers/playwright-fixture"; import type { Fixture, AppFixture } from "./helpers/create-fixture"; import { createFixtureProject } from "./helpers/create-fixture"; import { createAppFixture, createFixture, js } from "./helpers/create-fixture"; -import { flatRoutesWarning } from "../packages/remix-dev/config"; let fixture: Fixture; let appFixture: AppFixture; @@ -159,7 +158,7 @@ test.describe("flat routes", () => { }); } - test("allows ignoredRouteFiles to be configured", async ({ page }) => { + test("allows ignoredRouteFiles to be configured", async () => { let routeIds = Object.keys(fixture.build.routes); expect(routeIds).not.toContain(IGNORED_ROUTE); @@ -210,7 +209,9 @@ test.describe("warns when v1 routesConvention is used", () => { test("v2_routeConvention is not enabled", () => { console.log(buildOutput); - expect(buildOutput).toContain(flatRoutesWarning); + expect(buildOutput).toContain( + "The route file convention is changing in v2" + ); }); }); diff --git a/packages/remix-dev/__tests__/create-test.ts b/packages/remix-dev/__tests__/create-test.ts index 15d6d7fcc59..1fdb00c6f24 100644 --- a/packages/remix-dev/__tests__/create-test.ts +++ b/packages/remix-dev/__tests__/create-test.ts @@ -8,14 +8,6 @@ import stripAnsi from "strip-ansi"; import { run } from "../cli/run"; import { server } from "./msw"; -import { - errorBoundaryWarning, - flatRoutesWarning, - formMethodWarning, - headersWarning, - metaWarning, - serverModuleFormatWarning, -} from "../config"; beforeAll(() => server.listen({ onUnhandledRequest: "error" })); afterAll(() => server.close()); @@ -354,20 +346,8 @@ describe("the create command", () => { "--no-install", "--no-typescript", ]); - expect(output.trim()).toBe( - errorBoundaryWarning + - "\n" + - formMethodWarning + - "\n" + - metaWarning + - "\n" + - headersWarning + - "\n" + - serverModuleFormatWarning + - "\n" + - flatRoutesWarning + - "\n\n" + - getOptOutOfInstallMessage() + + expect(output.trim()).toContain( + getOptOutOfInstallMessage() + "\n\n" + getSuccessMessage(path.join("", "template-to-js")) ); diff --git a/packages/remix-dev/__tests__/readConfig-test.ts b/packages/remix-dev/__tests__/readConfig-test.ts index 3267b8717ef..18d08dbf424 100644 --- a/packages/remix-dev/__tests__/readConfig-test.ts +++ b/packages/remix-dev/__tests__/readConfig-test.ts @@ -1,23 +1,17 @@ import path from "path"; import type { RemixConfig } from "../config"; -import { serverBuildTargetWarning, readConfig } from "../config"; +import { readConfig } from "../config"; const remixRoot = path.resolve(__dirname, "./fixtures/stack"); describe("readConfig", () => { let config: RemixConfig; - let warnStub; beforeEach(async () => { - let consoleWarn = console.warn; - warnStub = jest.fn(); - console.warn = warnStub; config = await readConfig(remixRoot); - console.warn = consoleWarn; }); it("generates a config", async () => { - expect(warnStub).toHaveBeenCalledWith(serverBuildTargetWarning); expect(config).toMatchInlineSnapshot( { rootDirectory: expect.any(String),