Files
openidea/src/platform/dialog.test.ts
T
arookieofc 91023de207 chore(ci): route heap dump dialogs through the platform wrapper; clippy 1.99 and Windows test fixes (#2711)
Heap dump open/save use the platform dialog wrapper (GTK fallback on Linux). ide-heap allows clippy 1.99's large_enum_variant on the hot bit table. dialog.test compares paths with forward slashes on Windows.
2026-11-11 19:30:15 +08:00

17 lines
636 B
TypeScript

// @vitest-environment node
import { readdirSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { expect, it } from "vitest";
it("opens every file picker through the platform wrapper", () => {
const src = resolve(import.meta.dirname, "..");
const offenders = readdirSync(src, { recursive: true, encoding: "utf8" }).filter(
(file) =>
/\.[jt]sx?$/.test(file) &&
!/\.test\.[jt]sx?$/.test(file) &&
file.replace(/\\/g, "/") !== "platform/dialog.ts" &&
readFileSync(resolve(src, file), "utf8").includes("@tauri-apps/plugin-" + "dialog"),
);
expect(offenders).toEqual([]);
});