Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
import test from "node:test";
import assert from "node:assert/strict";
test("omniroute.mjs pode ser importado sem erro", async () => {
// Ensure the entry point module is syntactically valid by importing the submodule
// it uses (update-notifier) rather than executing the full CLI entrypoint.
const mod = await import("update-notifier");
assert.equal(typeof mod.default, "function");
});
test("update-notifier aceita pkg shape válido", async () => {
const updateNotifier = (await import("update-notifier")).default;
const notifier = updateNotifier({
pkg: { name: "omniroute", version: "0.0.1" },
updateCheckInterval: 0,
});
assert.ok(notifier !== null && typeof notifier === "object");
assert.equal(typeof notifier.notify, "function");
});
test("update-notifier não lança com pkg real", async () => {
const { readFileSync } = await import("node:fs");
const { join, dirname } = await import("node:path");
const { fileURLToPath } = await import("node:url");
const root = join(dirname(fileURLToPath(import.meta.url)), "..", "..");
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
const updateNotifier = (await import("update-notifier")).default;
assert.doesNotThrow(() =>
updateNotifier({
pkg: { name: pkg.name, version: pkg.version },
updateCheckInterval: 24 * 60 * 60 * 1000,
})
);
});