MCPcopy
hub / github.com/foambubble/foam / makeWorkspace

Function makeWorkspace

packages/foam-vscode/src/lint/convert-links-format.test.ts:35–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33
34describe('generateStdMdLink', () => {
35 const makeWorkspace = () => {
36 const dataStore = new InMemoryDataStore();
37 const workspace = createTestWorkspace([URI.file('/')], dataStore);
38 const notes = [
39 [
40 '/file-with-different-link-formats.md',
41 FILE_WITH_DIFFERENT_LINK_FORMATS,
42 ],
43 ['/first-document.md', `# First Document`],
44 ['/second-document.md', `# Second Document`],
45 ] as const;
46 for (const [uri, content] of notes) {
47 dataStore.set(URI.file(uri), content);
48 workspace.set(createNoteFromMarkdown(uri, content));
49 }
50 return workspace;
51 };
52
53 it('can generate markdown links correctly', () => {
54 const workspace = makeWorkspace();

Callers 1

Calls 5

setMethod · 0.95
createTestWorkspaceFunction · 0.90
createNoteFromMarkdownFunction · 0.90
fileMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected