Skip to content

Commit 5fc10ac

Browse files
committed
Fix lint errors
1 parent 66fd119 commit 5fc10ac

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

packages/core/src/fs-routes/converter.test.tsx

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ describe("convertPagesToModules", () => {
103103
});
104104

105105
it("generates guardLoader when guards and loader co-exist", async () => {
106-
const guard = async () => ({ type: "pass" as const });
107-
const loader = async () => ({ data: "test" });
108-
109-
const pages = [createMockPage("/dashboard", { guards: [guard], loader })];
106+
const pages = [
107+
createMockPage("/dashboard", {
108+
guards: [async () => ({ type: "pass" as const })],
109+
loader: async () => ({ data: "test" }),
110+
}),
111+
];
110112
const modules = convertPagesToModules(pages);
111113

112114
// guardLoader should be generated (wraps guards + baseLoader)
@@ -122,12 +124,12 @@ describe("convertPagesToModules", () => {
122124
});
123125

124126
it("generates guardLoader for resource when guards and loader co-exist", async () => {
125-
const guard = async () => ({ type: "pass" as const });
126-
const loader = async () => ({ items: [1, 2, 3] });
127-
128127
const pages = [
129128
createMockPage("/dashboard"),
130-
createMockPage("/dashboard/orders", { guards: [guard], loader }),
129+
createMockPage("/dashboard/orders", {
130+
guards: [async () => ({ type: "pass" as const })],
131+
loader: async () => ({ items: [1, 2, 3] }),
132+
}),
131133
];
132134
const modules = convertPagesToModules(pages);
133135

0 commit comments

Comments
 (0)