mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-07 08:27:12 +00:00
17 lines
634 B
TypeScript
17 lines
634 B
TypeScript
import { describe, expect, test } from "bun:test";
|
|
import { matchRoutes } from "react-router";
|
|
|
|
import InstallApp from "./install-app";
|
|
import { installRoutes } from "./install-router";
|
|
|
|
function matchedComponents(path: string) {
|
|
return matchRoutes(installRoutes, path)?.map((match) => match.route.Component) ?? [];
|
|
}
|
|
|
|
describe("install router", () => {
|
|
test("mounts the install app for the root and install paths", () => {
|
|
expect(matchedComponents("/")).toContain(InstallApp);
|
|
expect(matchedComponents("/install")).toContain(InstallApp);
|
|
expect(matchedComponents("/install/welcome")).toContain(InstallApp);
|
|
});
|
|
});
|