mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-01 02:15:19 +00:00
(test): add local Obsidian E2E suite
This commit is contained in:
@@ -71,9 +71,10 @@ export async function openVaultWithObsidianCli(
|
||||
export async function evalObsidianJson<T>(
|
||||
cliBinary: string,
|
||||
code: string,
|
||||
env: NodeJS.ProcessEnv = process.env
|
||||
env: NodeJS.ProcessEnv = process.env,
|
||||
timeoutMs?: number
|
||||
): Promise<T> {
|
||||
const result = await runObsidianCli(cliBinary, ["eval", `code=${code}`], env);
|
||||
const result = await runObsidianCli(cliBinary, ["eval", `code=${code}`], env, timeoutMs);
|
||||
if (result.code !== 0) {
|
||||
throw new Error(
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user