feat(desktop): add connection-level database browser

This commit is contained in:
二丫讲梵 authored and GitHub committed 2026-08-12 02:20:05 +08:00
1 parent 44dbd0e0e7
commit fee3ed1d5a
46 files changed
+781 -29

No files matched your search

@@ -0,0 +1,11 @@
import { readFileSync } from "node:fs";
import { describe, expect, it } from "vitest";
const source = readFileSync(new URL("../DatabaseBrowser.vue", import.meta.url), "utf8");
describe("DatabaseBrowser metadata fallback", () => {
it("falls back to basic database names when extended metadata fails", () => {
expect(source).toMatch(/await api\.listDatabaseMetadata\(props\.connection\.id\)[\s\S]*?catch \(metadataError\)[\s\S]*?await api\.listDatabases\(props\.connection\.id\)/);
expect(source).toMatch(/catch \{\s*throw metadataError;\s*\}/);
});
});