mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-24 08:03:19 +00:00
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.
17 lines
636 B
TypeScript
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([]);
|
|
});
|