Files
openidea/src/features/database/nodes.test.ts
T
Budi Santosoandboenkkk 8ddf979cfe feat(db): separate procedures and functions into their own schema folders (#2270)
The database tree lists routines in one `routines` folder. A Separate Procedures and Functions option in the Database tool window's menu (off by default, remembered across sessions) lists `procedures` and `functions` folders instead, each holding only routines of that kind, with the same overload-aware keys and object filter. Expanded folders carry over when the option is switched either way.

Co-authored-by: boenkkk <17746937+boenkkk@users.noreply.github.com>
2026-11-09 18:05:59 +08:00

18 lines
702 B
TypeScript

import { describe, expect, it } from "vitest";
import { routineFolder, tableFolder } from "./nodes";
describe("schema folders", () => {
it("combines routines by default and separates them on request", () => {
expect(routineFolder("procedure")).toBe("routines");
expect(routineFolder("function")).toBe("routines");
expect(routineFolder("procedure", true)).toBe("procedures");
expect(routineFolder("function", true)).toBe("functions");
});
it("keeps tables, views and materialized views apart", () => {
expect(tableFolder("table")).toBe("tables");
expect(tableFolder("view")).toBe("views");
expect(tableFolder("materializedView")).toBe("materializedViews");
});
});