(overrides: Partial<TaskNotesPlugin> = {})
| 17 | } |
| 18 | |
| 19 | function 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 | |
| 48 | describe("taskCardCompletionState", () => { |
| 49 | it("syncs completion, status, priority, project, and title state with sanitized classes", () => { |
no outgoing calls
no test coverage detected