MCPcopy
hub / github.com/callumalpass/tasknotes / closeObsidian

Function closeObsidian

e2e/obsidian.ts:391–409  ·  view source on GitHub ↗
(app: ObsidianApp)

Source from the content-addressed store, hash-verified

389}
390
391export async function closeObsidian(app: ObsidianApp): Promise<void> {
392 // Don't close if we connected to an existing instance - leave it running for the next test run
393 if (app.isExistingInstance) {
394 console.log('Keeping existing Obsidian instance running');
395 return;
396 }
397 if (app.browser) {
398 // Close all open tabs/pages before closing the browser
399 for (const context of app.browser.contexts()) {
400 for (const page of context.pages()) {
401 await page.close().catch(() => {});
402 }
403 }
404 await app.browser.close();
405 }
406 if (app.process) {
407 app.process.kill();
408 }
409}
410
411export async function openCommandPalette(page: Page): Promise<void> {
412 // Close any existing modals first

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected