AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
import { spyOn } from "bun:test";
import { api } from "../api.ts";
const GITHUB_API_METHODS = [
"getGithubPluginLatestManifest",
"getGithubPluginRepositoryManifest",
"getGithubPluginRelease",
"downloadGithubPluginAssetById",
"downloadGithubPluginAsset",
];
export const stubUnavailableGithubInstance = () => {
const spies = GITHUB_API_METHODS.map((method) =>
spyOn(api, method).mockImplementation(async () => {
throw new Error("Test instance is unavailable");
})
);
return () => spies.forEach((spy) => spy.mockRestore());
};