Download apps/vis/server/test/lib/reveal.test.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/server/test/lib/reveal.test.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/apps/vis/server/test/lib/reveal.test.ts
-
curl -L -o reveal.test.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/server/test/lib/reveal.test.ts
775 Bytes
| import { describe, it, expect } from 'vitest'; | |
| import { revealCommandFor } from '../../src/lib/reveal'; | |
| describe('reveal', () => { | |
| it('uses `open` on macOS', () => { | |
| expect(revealCommandFor('/tmp/x', 'darwin')).toEqual({ | |
| command: 'open', | |
| args: ['/tmp/x'], | |
| }); | |
| }); | |
| it('uses cmd /c start on Windows', () => { | |
| expect(revealCommandFor('C:\\x', 'win32')).toEqual({ | |
| command: 'cmd', | |
| args: ['/c', 'start', '""', 'C:\\x'], | |
| }); | |
| }); | |
| it('uses xdg-open on Linux and other unixes', () => { | |
| expect(revealCommandFor('/tmp/x', 'linux')).toEqual({ | |
| command: 'xdg-open', | |
| args: ['/tmp/x'], | |
| }); | |
| expect(revealCommandFor('/tmp/x', 'freebsd')).toEqual({ | |
| command: 'xdg-open', | |
| args: ['/tmp/x'], | |
| }); | |
| }); | |
| }); | |