18 lines
582 B
TypeScript
18 lines
582 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
|
|
import { loader } from "./chat.archived";
|
|
|
|
describe("archived chat route", () => {
|
|
it("keeps the canonical route reachable and opens the archived index view", () => {
|
|
const response = loader({
|
|
request: new Request("https://app.test/demo/chat/archived?query=montage"),
|
|
params: { tenant: "demo" },
|
|
context: {},
|
|
unstable_pattern: "/:tenant/chat/archived",
|
|
});
|
|
|
|
expect(response.status).toBe(302);
|
|
expect(response.headers.get("Location")).toBe("/demo/chat?archived=true&query=montage");
|
|
});
|
|
});
|