Files
dbx/tests/agentDriverInstallHint.test.ts
T
t8y2 1bcfd02de1 feat: add Microsoft Access database support
Add Access as a new database type with agent-based connectivity,
UCanAccess JDBC URL parsing, backtick identifier quoting, file-path
connection dialog, and PNG icons for Access/GoldenDB/Vastbase.
2026-05-17 09:57:04 +08:00

24 lines
1.1 KiB
TypeScript

import assert from "node:assert/strict";
import test from "node:test";
import { showAgentDriverInstallHint } from "../src/lib/agentDriverInstallHint.ts";
test("hides the agent driver install hint when the selected driver is installed", () => {
assert.equal(showAgentDriverInstallHint("informix", [{ db_type: "informix", installed: true }]), false);
});
test("shows the agent driver install hint when the selected driver is missing", () => {
assert.equal(showAgentDriverInstallHint("informix", [{ db_type: "informix", installed: false }]), true);
});
test("shows the agent driver install hint for TDengine when missing", () => {
assert.equal(showAgentDriverInstallHint("tdengine", [{ db_type: "tdengine", installed: false }]), true);
});
test("shows the agent driver install hint for Access when missing", () => {
assert.equal(showAgentDriverInstallHint("access", [{ db_type: "access", installed: false }]), true);
});
test("does not show agent driver install hints for built-in database types", () => {
assert.equal(showAgentDriverInstallHint("mysql", [{ db_type: "informix", installed: false }]), false);
});