Skip to content

Commit

Permalink
tests: add tests from #5938
Browse files Browse the repository at this point in the history
Signed-off-by: Logan McAnsh <[email protected]>
  • Loading branch information
mcansh committed Apr 11, 2023
1 parent 187b06c commit 3cda0db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/remix-react/__tests__/hook-types-test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ describe("type serializer", () => {
type response = LoaderData<AppData>;
isEqual<response, { arg1: string; arg2?: number }>(true);
});

it("allows data key in value", () => {
type AppData = { data: { hello: string } };
type response = LoaderData<AppData>;
isEqual<response, { data: { hello: string } }>(true);
});
});

describe("deferred type serializer", () => {
Expand Down Expand Up @@ -261,4 +267,10 @@ describe("deferred type serializer", () => {
{ hello: SerializedAppData; lazy: Promise<SerializedAppData> }
>(true);
});

it("allows data key in value", () => {
type AppData = { data: Promise<{ hello: string }> };
type response = LoaderData<AppData>;
isEqual<response, { data: Promise<{ hello: string }> }>(true);
});
});

0 comments on commit 3cda0db

Please sign in to comment.