Skip to content

Commit

Permalink
chore: allow all properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mcansh authored Dec 21, 2022
1 parent d772e17 commit 8a7088c
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions packages/remix-testing/create-remix-stub.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,7 @@ type RemixStubOptions = {
remixConfigFuture?: Partial<FutureConfig>;
};

type StubRouteObject = Omit<
RouteObject,
"id" | "handle" | "shouldRevalidate" | "errorElement" | "hasErrorBoundary"
>;

export function createRemixStub(routes: StubRouteObject[]) {
export function createRemixStub(routes: RouteObject[]) {
return function RemixStub({
initialEntries,
initialIndex,
Expand All @@ -58,7 +53,7 @@ export function createRemixStub(routes: StubRouteObject[]) {
let remixContextRef = React.useRef<RemixContextObject>();

if (routerRef.current == null) {
routerRef.current = createMemoryRouter(routes as RouteObject[], {
routerRef.current = createMemoryRouter(routes, {
initialEntries,
initialIndex,
hydrationData,
Expand All @@ -71,8 +66,8 @@ export function createRemixStub(routes: StubRouteObject[]) {
v2_meta: false,
...remixConfigFuture,
},
manifest: createManifest(routes as RouteObject[]),
routeModules: createRouteModules(routes as RouteObject[]),
manifest: createManifest(routes),
routeModules: createRouteModules(routes),
};
}

Expand Down

0 comments on commit 8a7088c

Please sign in to comment.