Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
remix-run-bot committed Dec 7, 2022
1 parent 18295fd commit 46b0621
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions packages/remix-dev/__tests__/routesConvention-test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import * as path from "path";

import { createRoutePath, defineConventionalRoutes } from "../config/routesConvention";
import {
createRoutePath,
defineConventionalRoutes,
} from "../config/routesConvention";

describe("createRoutePath", () => {
describe("creates proper route paths", () => {
Expand Down Expand Up @@ -50,10 +53,12 @@ describe("createRoutePath", () => {

describe("defineConventionalRoutes", () => {
it("creates a route manifest from the routes directory", () => {
let routes = defineConventionalRoutes(path.join(__dirname, "fixtures/replace-remix-magic-imports/app"));
let routes = defineConventionalRoutes(
path.join(__dirname, "fixtures/replace-remix-magic-imports/app")
);
let keys = Object.keys(routes);
expect(keys.length).toBe(14)
expect(keys.filter(key => routes[key].parentId).length).toBe(5)
expect(keys.filter(key => routes[key].index).length).toBe(4)
})
})
expect(keys.length).toBe(14);
expect(keys.filter((key) => routes[key].parentId).length).toBe(5);
expect(keys.filter((key) => routes[key].index).length).toBe(4);
});
});

0 comments on commit 46b0621

Please sign in to comment.