Commit Graph
3 Commits
Author SHA1 Message Date
Tam Nhu Tran 539afea737 style: format source and test files 2026-02-17 17:03:11 +07:00
kaitranntt 596a9c6843 test(setup): add unit tests for setup_completed flag detection
- Add 3 test cases for setup_completed flag:
  - Detect flag when present and true
  - Treat missing flag as first-time eligible
  - Treat false flag as first-time eligible
- Update JSDoc to document detection priority order

Addresses code review feedback on PR #372.
2026-01-25 21:26:23 -05:00
kaitranntt 92a79aa78b test(auth): add comprehensive tests for GLM auth persistence fix
Add 26 new unit tests covering:
- isFirstTimeInstall() legacy config detection (8 tests)
- loadSettingsFromFile() path expansion (5 tests)
- ProfileDetector detectProfileType() (4 tests)
- expandPath() cross-platform handling (10 tests)

Test coverage for issue #195:
- Legacy config.json/profiles.json detection
- Tilde expansion to home directory
- Environment variable expansion (${VAR}, $VAR, %VAR%)
- Mixed path separator normalization
- Corrupted config graceful handling

Files:
- tests/unit/commands/setup-command.test.ts
- tests/unit/auth/profile-detector.test.ts
- tests/unit/utils/expand-path.test.ts
2025-12-24 18:33:52 -05:00