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

Function makeWorkspace

packages/foam-core/src/lint/lint.test.ts:19–28  ·  view source on GitHub ↗
(notes: { uri: string; content: string }[])

Source from the content-addressed store, hash-verified

17Logger.setLevel('error');
18
19const makeWorkspace = async (notes: { uri: string; content: string }[]) => {
20 const dataStore = new InMemoryDataStore();
21 const workspace = createTestWorkspace([URI.file('/')], dataStore);
22 for (const { uri, content } of notes) {
23 const foamUri = URI.file(uri);
24 dataStore.set(foamUri, content);
25 workspace.set(createNoteFromMarkdown(uri, content));
26 }
27 return { workspace, dataStore };
28};
29
30describe('missingHeadingRule', () => {
31 it('returns no issues for a note with an h1', async () => {

Callers 1

lint.test.tsFile · 0.70

Calls 5

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

Tested by

no test coverage detected