Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

810 B
Raw Blame
import { spaceNavigationDestination } from "utils/navigation";
import { describe, expect, it } from "vitest";

describe("navigation destinations", () => {
    it.each([
        ["/app", "/app"],
        ["/app/notifications", undefined],
        ["/app/profile", undefined],
        ["/app/settings/profile/name", "/app"],
        ["/app/post", "/app"],
        ["/app/posts/[spaceId]/[postId]", "/app"],
        ["/app/messages/[spaceId]", "/app/messages"],
        ["/app/friends", "/app/friends"],
        ["/profile-link", "/app/friends"],
        ["/app/profile/photo-edit", undefined],
        ["/login", undefined],
        ["/application", undefined],
    ])("keeps %s in its parent destination", (path, destination) => {
        expect(spaceNavigationDestination(path)).toBe(destination);
    });
});