Download mods/diff/tests/git/probes/repository-of.test.ts from SaylorTwift/claude-code: direct link, hf CLI and curl.
- Browser
- Download file 864 Bytes
-
https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/git/probes/repository-of.test.ts
- Command line
-
hf download hf://SaylorTwift/claude-code/mods/diff/tests/git/probes/repository-of.test.ts
-
curl -L -o repository-of.test.ts https://huggingface.co/SaylorTwift/claude-code/resolve/main/mods/diff/tests/git/probes/repository-of.test.ts
864 Bytes
| import { describe, expect, test, tier } from 'claude-code/testing' | |
| import Fixtures from '../../fixtures' | |
| tier('builtin') | |
| describe('repository-of', () => { | |
| test('three absolute lines are the repository', async () => { | |
| expect(await Fixtures.probedRepositoryOf(Fixtures.RESOLVED)).toEqual({ | |
| toplevel: '/r', | |
| gitDir: '/r/.git/worktrees/w', | |
| commonDir: '/r/.git', | |
| }) | |
| expect(await Fixtures.probedRepositoryOf(Fixtures.WINDOWS)).toEqual({ | |
| toplevel: 'C:/r', | |
| gitDir: 'C:/r/.git', | |
| commonDir: 'C:/r/.git', | |
| }) | |
| }) | |
| test('a git that echoes the flag, or a relative path: nothing', async () => { | |
| expect(await Fixtures.probedRepositoryOf(Fixtures.ECHOED_FLAG)).toBeNull() | |
| expect(await Fixtures.probedRepositoryOf(Fixtures.RELATIVE)).toBeNull() | |
| expect(await Fixtures.probedRepositoryOf('')).toBeNull() | |
| }) | |
| }) | |