Skip to content

Commit

Permalink
Fix e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
brophdawg11 committed Oct 9, 2024
1 parent 1de9865 commit d721548
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions integration/single-fetch-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ test.describe("single-fetch", () => {
});
});

test("loads proper data (via unstable_data) on single fetch loader requests", async () => {
test("loads proper data (via data) on single fetch loader requests", async () => {
let fixture = await createFixture({
config: {
future: {
Expand Down Expand Up @@ -310,7 +310,7 @@ test.describe("single-fetch", () => {
});
});

test("loads proper data (via unstable_data) on single fetch action requests", async () => {
test("loads proper data (via data) on single fetch action requests", async () => {
let fixture = await createFixture({
config: {
future: {
Expand Down Expand Up @@ -565,7 +565,7 @@ test.describe("single-fetch", () => {
expect(urls).toEqual([]);
});

test("does not revalidate on 4xx/5xx action responses (via unstable_data)", async ({
test("does not revalidate on 4xx/5xx action responses (via data)", async ({
page,
}) => {
let fixture = await createFixture({
Expand All @@ -577,21 +577,21 @@ test.describe("single-fetch", () => {
files: {
...files,
"app/routes/action.tsx": js`
import { Form, Link, useActionData, useLoaderData, useNavigation, unstable_data } from '@remix-run/react';
import { Form, Link, useActionData, useLoaderData, useNavigation, data } from '@remix-run/react';
export async function action({ request }) {
let fd = await request.formData();
if (fd.get('throw') === "5xx") {
throw unstable_data("Thrown 500", { status: 500 });
throw data("Thrown 500", { status: 500 });
}
if (fd.get('throw') === "4xx") {
throw unstable_data("Thrown 400", { status: 400 });
throw data("Thrown 400", { status: 400 });
}
if (fd.get('return') === "5xx") {
return unstable_data("Returned 500", { status: 500 });
return data("Returned 500", { status: 500 });
}
if (fd.get('return') === "4xx") {
return unstable_data("Returned 400", { status: 400 });
return data("Returned 400", { status: 400 });
}
return null;
}
Expand Down

0 comments on commit d721548

Please sign in to comment.