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 | |
| 3 | import { shouldUseMarkdownFileBrowserPrimaryAction } from "./MarkdownFileLink.logic"; |
| 4 | |
| 5 | it("opens PDFs in the file panel and uses the browser only when no other destination exists", () => { |
| 6 | expect( |
| 7 | shouldUseMarkdownFileBrowserPrimaryAction({ |
| 8 | canOpenInEditor: true, |
| 9 | canOpenInBrowser: true, |
| 10 | canOpenInPanel: true, |
| 11 | }), |
| 12 | ).toBe(false); |
| 13 | expect( |
| 14 | shouldUseMarkdownFileBrowserPrimaryAction({ |
| 15 | canOpenInEditor: false, |
| 16 | canOpenInBrowser: true, |
| 17 | canOpenInPanel: true, |
| 18 | }), |
| 19 | ).toBe(false); |
| 20 | expect( |
| 21 | shouldUseMarkdownFileBrowserPrimaryAction({ |
| 22 | canOpenInEditor: false, |
| 23 | canOpenInBrowser: true, |
| 24 | canOpenInPanel: false, |
| 25 | }), |
| 26 | ).toBe(true); |
| 27 | }); |