MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / start

Function start

__tests__/watcher.test.ts:1257–1263  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1255 fs.symlinkSync(target, name, process.platform === 'win32' ? 'junction' : 'dir');
1256 const has = (name: string) => cg!.getNodesByName(name).length > 0;
1257 const start = async () => {
1258 cg = initGraph(testDir, { config: { include: ['**/*.ts'], exclude: [] } });
1259 await cg.indexAll();
1260 expect(cg.watch({ debounceMs: 100 })).toBe(true);
1261 // FSEvents can coalesce writes made while a new stream is being registered.
1262 await new Promise(resolve => setTimeout(resolve, 700));
1263 };
1264 // fs.watch() returns before macOS registers the stream: libuv serves every
1265 // watch in a process from one FSEvents stream, rebuilt on its own thread
1266 // after each watch/close, and an edit made before that lands is never

Callers 1

watcher.test.tsFile · 0.70

Calls 3

initGraphFunction · 0.85
watchMethod · 0.80
indexAllMethod · 0.45

Tested by

no test coverage detected