Skip to content

Commit

Permalink
drop v3 test
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanBacon committed Nov 17, 2023
1 parent 66af5d5 commit 16b8df6
Showing 1 changed file with 0 additions and 70 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,76 +286,6 @@ describe(loadStaticParamsAsync, () => {
`);
});

it(`preserves API routes`, async () => {
const ctx = createMockContextModule({
"./index.tsx": {
default() {},
},
"./foo+api.tsx": {
GET() {},
},
"./[post]+api.tsx": {
POST() {},
},
});

const route = getExactRoutes(ctx, { preserveApiRoutes: true })!;

expect(dropFunctions(route)).toEqual({
children: [
{
children: [],
contextKey: "./index.tsx",
dynamic: null,
route: "index",
},
{
children: [],
contextKey: "./foo+api.tsx",
dynamic: null,
route: "foo",
},
{
children: [],
contextKey: "./[post]+api.tsx",
dynamic: [{ deep: false, name: "post" }],
route: "[post]",
},
],
contextKey: "./_layout.tsx",
dynamic: null,
generated: true,
route: "",
});

expect(dropFunctions(await loadStaticParamsAsync(route))).toEqual({
children: [
{
children: [],
contextKey: "./index.tsx",
dynamic: null,
route: "index",
},
{
children: [],
contextKey: "./foo+api.tsx",
dynamic: null,
route: "foo",
},
{
children: [],
contextKey: "./[post]+api.tsx",
dynamic: [{ deep: false, name: "post" }],
route: "[post]",
},
],
contextKey: "./_layout.tsx",
dynamic: null,
generated: true,
route: "",
});
});

it(`evaluates with nested deep dynamic segments`, async () => {
const ctx = createMockContextModule({
"./post/[...post].tsx": {
Expand Down

0 comments on commit 16b8df6

Please sign in to comment.