feat: add config for kanban columns
This commit is contained in:
@@ -4,7 +4,10 @@ import { serializeProjectConfig } from "./serializeProjectConfig";
|
||||
|
||||
describe("serializeProjectConfig", () => {
|
||||
it("round-trips tags", () => {
|
||||
const yaml = serializeProjectConfig({ tags: ["bug", "docs"] });
|
||||
const yaml = serializeProjectConfig({
|
||||
tags: ["bug", "docs"],
|
||||
shownHiddenColumns: [],
|
||||
});
|
||||
expect(yaml).toContain("bug");
|
||||
expect(yaml).toContain("docs");
|
||||
const parsed = parseProjectConfig(yaml);
|
||||
@@ -14,10 +17,33 @@ describe("serializeProjectConfig", () => {
|
||||
});
|
||||
|
||||
it("serializes empty tags", () => {
|
||||
const yaml = serializeProjectConfig({ tags: [] });
|
||||
const yaml = serializeProjectConfig({ tags: [], shownHiddenColumns: [] });
|
||||
const parsed = parseProjectConfig(yaml);
|
||||
expect(parsed.isOk()).toBe(true);
|
||||
if (parsed.isErr()) return;
|
||||
expect(parsed.value.tags).toEqual([]);
|
||||
});
|
||||
|
||||
it("round-trips tags with shownHiddenColumns", () => {
|
||||
const yaml = serializeProjectConfig({
|
||||
tags: ["bug"],
|
||||
shownHiddenColumns: ["backlog", "cancelled"],
|
||||
});
|
||||
const parsed = parseProjectConfig(yaml);
|
||||
expect(parsed.isOk()).toBe(true);
|
||||
if (parsed.isErr()) return;
|
||||
expect(parsed.value.tags).toEqual(["bug"]);
|
||||
expect(parsed.value.shownHiddenColumns).toEqual(["backlog", "cancelled"]);
|
||||
});
|
||||
|
||||
it("serializes empty shownHiddenColumns", () => {
|
||||
const yaml = serializeProjectConfig({
|
||||
tags: [],
|
||||
shownHiddenColumns: [],
|
||||
});
|
||||
const parsed = parseProjectConfig(yaml);
|
||||
expect(parsed.isOk()).toBe(true);
|
||||
if (parsed.isErr()) return;
|
||||
expect(parsed.value.shownHiddenColumns).toEqual([]);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user