MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / createPlugin

Function createPlugin

tests/unit/ui/taskCardCompletionState.test.ts:19–46  ·  view source on GitHub ↗
(overrides: Partial<TaskNotesPlugin> = {})

Source from the content-addressed store, hash-verified

17}
18
19function createPlugin(overrides: Partial<TaskNotesPlugin> = {}): TaskNotesPlugin {
20 return {
21 settings: {
22 showCompletedTaskStrikethrough: true,
23 subtaskChevronPosition: "right",
24 statuses: [
25 { id: "open", value: "open", label: "Open", color: "#888888" },
26 { id: "in-progress", value: "In Progress", label: "In Progress", color: "#123456" },
27 ],
28 },
29 statusManager: {
30 getNextStatus: jest.fn(() => "In Progress"),
31 getStatusConfig: jest.fn((status: string) => ({
32 id: status,
33 value: status,
34 label: status,
35 color: "#123456",
36 })),
37 },
38 getActiveTimeSession: jest.fn(() => null),
39 app: {
40 metadataCache: {
41 getCache: jest.fn(() => null),
42 },
43 },
44 ...overrides,
45 } as unknown as TaskNotesPlugin;
46}
47
48describe("taskCardCompletionState", () => {
49 it("syncs completion, status, priority, project, and title state with sanitized classes", () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected