Download packages/migration-legacy/test/paths.test.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 1.39 kB
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/migration-legacy/test/paths.test.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/migration-legacy/test/paths.test.ts
-
curl -L -o paths.test.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/migration-legacy/test/paths.test.ts
1.39 kB
| import { describe, expect, it } from 'vitest'; | |
| import { join } from 'node:path'; | |
| import * as paths from '../src/paths.js'; | |
| describe('paths', () => { | |
| it('sourceCredentialsDir joins ~/.kimi/credentials', () => { | |
| expect(paths.sourceCredentialsDir('/x/.kimi')).toBe(join('/x/.kimi', 'credentials')); | |
| }); | |
| it('targetConfigFile and targetTuiFile', () => { | |
| expect(paths.targetConfigFile('/y')).toBe(join('/y', 'config.toml')); | |
| expect(paths.targetTuiFile('/y')).toBe(join('/y', 'tui.toml')); | |
| }); | |
| it('targetSessionIndex', () => { | |
| expect(paths.targetSessionIndex('/y')).toBe(join('/y', 'session_index.jsonl')); | |
| }); | |
| it('migratedMarker is under source', () => { | |
| expect(paths.migratedMarker('/x/.kimi')).toBe(join('/x/.kimi', '.migrated-to-kimi-code')); | |
| }); | |
| it('skipMarker is under target', () => { | |
| expect(paths.skipMarker('/y/.kimi-code')).toBe(join('/y/.kimi-code', '.skip-migration-from-kimi-cli')); | |
| }); | |
| it('migrationReportFile is under target', () => { | |
| expect(paths.migrationReportFile('/y')).toBe(join('/y', 'migration-report.json')); | |
| }); | |
| it('sourceSessionsDir / sourceUserHistoryDir / sourceKimiJson', () => { | |
| expect(paths.sourceSessionsDir('/x')).toBe(join('/x', 'sessions')); | |
| expect(paths.sourceUserHistoryDir('/x')).toBe(join('/x', 'user-history')); | |
| expect(paths.sourceKimiJson('/x')).toBe(join('/x', 'kimi.json')); | |
| }); | |
| }); | |