MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / createView

Function createView

tests/unit/ui/TaskListView.groupCollapse.test.ts:19–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18describe("TaskListView group collapse controls", () => {
19 const createView = () => {
20 const plugin = {
21 app: new App(),
22 fieldMapper: new FieldMapper(DEFAULT_FIELD_MAPPING),
23 settings: {
24 fieldMapping: DEFAULT_FIELD_MAPPING,
25 },
26 };
27 const containerEl = document.createElement("div");
28 document.body.appendChild(containerEl);
29 const view = new TaskListView({}, containerEl, plugin as any);
30 (view as any).app = {
31 metadataCache: {
32 getFirstLinkpathDest: jest.fn(() => null),
33 },
34 workspace: {},
35 };
36 return view;
37 };
38
39 beforeEach(() => {
40 MockObsidian.reset();

Calls

no outgoing calls

Tested by

no test coverage detected