@wginit/mcp-vue-unit-test
v1.0.0
Published
Vue 单元测试工具
Maintainers
Readme
vue-unit-test 单元测试
输入一个 Vue2 SFC 文件路径 → 生成对应的 Jest 测试代码 → 写入 tests/unit/*.spec.js
功能列表 MCP Tool:
readSource:读取源文件(.vue) parseVue2:使用 vue-template-compiler + babel parser 提取: props data methods computed emits writeTestFile:将生成的测试文件写入 tests/unit MCP Prompt: 根据解析数据自动生成可运行的 Jest 测试模板,包括: describe shallowMount props 测试 methods 测试 data 测试 computed 测试 emits 测试 snapshot(可选)
