6f213e1f02
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
13 lines
527 B
TypeScript
13 lines
527 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { EXPORT_STATUSES, exportUrl } from "./productsApi";
|
|
|
|
describe("export url", () => {
|
|
it("lists the four status filters with 'all' first", () => {
|
|
expect(EXPORT_STATUSES.map((s) => s.value)).toEqual(["all", "active", "draft", "archived"]);
|
|
});
|
|
it("builds the endpoint url with the status query", () => {
|
|
expect(exportUrl("all")).toBe("/api/products/export?status=all");
|
|
expect(exportUrl("archived")).toBe("/api/products/export?status=archived");
|
|
});
|
|
});
|