1个回答
test
2024-07-05
其实直接用 Jest
应该就可以把?另外 Awesome Vue
里面就提供了测试相关的几个依赖你可以都了解一下 👉 Test - vuejs/awesome-vue
- vuenit - Utilities for testing Vue components and directives.
- vue-unit - A library for Vue.js that makes it easier to create and unit test components.
- vue-a2b - A library for Split Testing with Vue.js (A/B Testing). Highly configurable and tiny (1.2k gzipped).
- vue-test-utils - Official utilities for testing Vue components.
- vue-test-actions - Unit testing Vuex actions with Jest mocks.
- jest-vue-matcher - Additional jest matchers for vue
- vue-hubble - A better way to select elements for UI testing in Vue.
- Vue Testing Library - Simple and complete testing utilities that encourage good testing practices. Based on DOM Testing Library and built upon the official Vue Test Utils.
- jest-serializer-vue-tjw - Improved formatting of Jest Snapshots
- vuex-test-utils - Unit testing Vux with chai.
回复
适合作为回答的
- 经过验证的有效解决办法
- 自己的经验指引,对解决问题有帮助
- 遵循 Markdown 语法排版,代码语义正确
不该作为回答的
- 询问内容细节或回复楼层
- 与题目无关的内容
- “赞”“顶”“同问”“看手册”“解决了没”等毫无意义的内容