Skip to content

Commit 416d3e2

Browse files
Remove missing react-router exports in tests (#13392)
1 parent 8bf7177 commit 416d3e2

13 files changed

+11
-28
lines changed

integration/action-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ test.describe("actions", () => {
7474
`,
7575

7676
[`app/routes/${THROWS_REDIRECT}.jsx`]: js`
77-
import { redirect } from "react-router";
78-
import { Form } from "react-router";
77+
import { redirect, Form } from "react-router";
7978
8079
export function action() {
8180
throw redirect("/${REDIRECT_TARGET}")

integration/blocking-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ test("handles synchronous proceeding correctly", async ({ page }) => {
4040
`,
4141
"app/routes/b.tsx": js`
4242
import * as React from "react";
43-
import { Form, useAction, useBlocker } from "react-router";
43+
import { Form, useBlocker } from "react-router";
4444
export default function Component() {
4545
return (
4646
<div>

integration/client-data-test.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ test.describe("Client Data", () => {
335335
}),
336336
"app/routes/parent.child.tsx": js`
337337
import * as React from 'react';
338-
import { json } from "react-router"
339338
import { Await, useLoaderData } from "react-router"
340339
export function loader() {
341340
return {
@@ -685,7 +684,6 @@ test.describe("Client Data", () => {
685684
}),
686685
"app/routes/parent.child.tsx": js`
687686
import * as React from 'react';
688-
import { json } from "react-router";
689687
import { useLoaderData, useRevalidator } from "react-router";
690688
let isFirstCall = true;
691689
export async function loader({ serverLoader }) {
@@ -763,7 +761,7 @@ test.describe("Client Data", () => {
763761
childClientLoaderHydrate: false,
764762
}),
765763
"app/routes/parent.child.tsx": js`
766-
import { ClientLoaderFunctionArgs, useRouteError } from "react-router";
764+
import { useRouteError } from "react-router";
767765
768766
export function loader() {
769767
throw new Error("Broken!")
@@ -1286,7 +1284,6 @@ test.describe("Client Data", () => {
12861284
}),
12871285
"app/routes/parent.child.tsx": js`
12881286
import * as React from 'react';
1289-
import { json } from "react-router";
12901287
import { Form, useRouteError } from "react-router";
12911288
export async function clientAction({ serverAction }) {
12921289
return await serverAction();
@@ -1508,7 +1505,6 @@ test.describe("Client Data", () => {
15081505
}),
15091506
"app/routes/parent.child.tsx": js`
15101507
import * as React from 'react';
1511-
import { json } from "react-router";
15121508
import { Form, useRouteError } from "react-router";
15131509
export async function clientAction({ serverAction }) {
15141510
return await serverAction();

integration/error-boundary-test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,6 @@ test("Allows back-button out of an error boundary after a hard reload", async ({
971971
`,
972972

973973
"app/routes/boom.tsx": js`
974-
import { json } from "react-router";
975974
export function loader() { return boom(); }
976975
export default function() { return <b>my page</b>; }
977976
`,

integration/fetch-globals-test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ test.beforeAll(async () => {
1414
fixture = await createFixture({
1515
files: {
1616
"app/routes/_index.tsx": js`
17-
import { json } from "react-router";
1817
import { useLoaderData } from "react-router";
1918
export async function loader() {
2019
const resp = await fetch('https://reqres.in/api/users?page=2');

integration/fetcher-test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ test.describe("useFetcher", () => {
2323
fixture = await createFixture({
2424
files: {
2525
"app/routes/resource-route-action-only.ts": js`
26-
import { json } from "react-router";
2726
export function action() {
2827
return new Response("${CHEESESTEAK}");
2928
}

integration/link-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,7 @@ test.describe("route module link export", () => {
357357
`,
358358

359359
"app/routes/gists.$username.tsx": js`
360-
import { data, redirect } from "react-router";
361-
import { Link, useLoaderData, useParams } from "react-router";
360+
import { data, redirect, Link, useLoaderData, useParams } from "react-router";
362361
export async function loader({ params }) {
363362
let { username } = params;
364363
if (username === "mjijackson") {

integration/multiple-cookies-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ test.describe("pathless layout routes", () => {
1616
await createFixture({
1717
files: {
1818
"app/routes/_index.tsx": js`
19-
import { data, redirect } from "react-router";
20-
import { Form, useActionData } from "react-router";
19+
import { data, redirect, Form, useActionData } from "react-router";
2120
2221
export let loader = async () => {
2322
let headers = new Headers();

integration/redirects-test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ test.describe("redirects", () => {
3535
`,
3636

3737
"app/routes/absolute._index.tsx": js`
38-
import { redirect } from "react-router";
39-
import { Form } from "react-router";
38+
import { redirect, Form } from "react-router";
4039
4140
export async function action({ request }) {
4241
return redirect(new URL(request.url).origin + "/absolute/landing");

integration/resource-routes-test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ test.describe("loader in an app", async () => {
114114
}
115115
`,
116116
"app/routes/$.tsx": js`
117-
import { json } from "react-router";
118117
import { useRouteError } from "react-router";
119118
export function loader({ request }) {
120119
throw Response.json({

0 commit comments

Comments
 (0)