feat: 搭建单元测试基础设施 — Bun test runner + 示例测试

添加 bunfig.toml 配置、test script,以及三组示例测试:
- src/utils/array.ts (intersperse, count, uniq)
- src/utils/set.ts (difference, intersects, every, union)
- packages/color-diff-napi (ansi256FromRgb, colorToEscape, detectLanguage 等)

41 tests, 0 failures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-01 02:08:38 +08:00
parent 9dd1eeff2f
commit e443a8fa51
6 changed files with 229 additions and 2 deletions

View File

@@ -21,5 +21,5 @@
- [ ] 冗余代码检查
- [x] git hook 的配置
- [ ] 代码健康度检查
- [ ] 单元测试基础设施搭建 (test runner 配置)
- [x] 单元测试基础设施搭建 (test runner 配置)
- [ ] CI/CD 流水线 (GitHub Actions)