Open
Conversation
🎯 核心功能: - 新增 TestFrameworkAdapter 适配器模式,统一测试框架 API - 在 globalConfig 中添加 testFramework 配置,默认为 'jest' - 支持运行时切换测试框架,向后兼容 🛠️ 技术实现: - 创建框架无关的测试工具函数 (testFn, useFakeTimers, etc.) - 使用全局变量声明避免直接导入测试框架依赖 - 更新所有组件使用统一的测试 API 📦 依赖管理: - 将 jest/vitest 移至 peerDependencies 并标记为可选 - 优化依赖结构,用户只需安装所需的测试框架 🧪 测试覆盖: - Jest: 42/42 套件, 230/230 用例 ✅ - Vitest: 42/42 套件, 230/230 用例 ✅ - 修复 Message 和 Form 组件在 Vitest 中的兼容性问题 📚 文档更新: - 更新 README.md 包含双框架使用说明 - 提供迁移脚本帮助现有项目升级
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎯 核心功能:
🛠️ 技术实现:
📦 依赖管理:
🧪 测试覆盖:
📚 文档更新: