The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { expect, it } from "vite-plus/test"; |
| 2 | import { filePreviewKind } from "@t3tools/shared/filePreview"; |
| 3 | |
| 4 | it.each([ |
| 5 | [ |
| 6 | "report.docx", |
| 7 | "application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
| 8 | "unsupported", |
| 9 | ], |
| 10 | [ |
| 11 | "budget.xlsx", |
| 12 | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", |
| 13 | "unsupported", |
| 14 | ], |
| 15 | [ |
| 16 | "deck.pptx", |
| 17 | "application/vnd.openxmlformats-officedocument.presentationml.presentation", |
| 18 | "unsupported", |
| 19 | ], |
| 20 | ["report.docx", "text/plain", "text"], |
| 21 | ["report.docx", "application/octet-stream", "unsupported"], |
| 22 | ["chart.mmd", "text/vnd.mermaid", "text"], |
| 23 | ["chart.mermaid", "text/plain", "text"], |
| 24 | ["chart.mmd", "application/octet-stream", "unsupported"], |
| 25 | ["font.ttf", "font/ttf", "unsupported"], |
| 26 | ] as const)("preserves mobile's existing path for %s (%s)", (name, mimeType, expected) => { |
| 27 | expect(filePreviewKind({ name, mimeType }, { richDocuments: false })).toBe(expected); |
| 28 | }); |