mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: convert file manager into a plugin
This commit is contained in:
1 parent
b76da9ab52
commit
c85c1fdb86
259 files changed
+54155
-16791
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveFilePreviewKind } from "../../src/frontend/file-preview-preload";
|
||||
|
||||
describe("resolveFilePreviewKind", () => {
|
||||
it.each([
|
||||
["photo.webp", "image"],
|
||||
["movie.webm", "video"],
|
||||
["voice.m4a", "audio"],
|
||||
["README.md", "markdown"],
|
||||
["manual.pdf", "pdf"],
|
||||
["notes.txt", "text"],
|
||||
["app.tsx", "code"],
|
||||
["Dockerfile", "code"],
|
||||
["LICENSE", "unknown"],
|
||||
] as const)("classifies %s as %s", (filename, expected) => {
|
||||
expect(resolveFilePreviewKind(filename)).toBe(expected);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user