Comments (3)
页面可尝试走 Component 构造器创建,应该也能测,但是生命周期可能不够完善。因为自定义组件本身粒度较细,所以才比较适合抽离出来做单元测试。
你想测试页面的话,也可以尝试一下开发者工具提供的自动化能力:https://developers.weixin.qq.com/miniprogram/dev/devtools/auto/ ,这个可以利用真正的小程序环境做完整的功能自动化测试。
from miniprogram-simulate.
如果想利用此项目改写成page的simulate,有没有什么需要注意的点呢?
from miniprogram-simulate.
如果想利用此项目改写成page的simulate,有没有什么需要注意的点呢?
如上面所提到的,page 必须走 component 构造器,一些 page 实例上独有的方法和生命周期则需要自己 mock。
from miniprogram-simulate.
Related Issues (20)
- TypeError: wx.nextTick is not a function HOT 1
- Cannot find module 'pretty-format/build/plugins/lib/markup' from 'node_modules/miniprogram-simulate/src/jest-snapshot-plugin.js' HOT 2
- pretty-format依赖应声明为dependencies
- view 的 animation 属性,会导致组件无法渲染,该怎么处理
- ReferenceError: getCurrentPages is not defined HOT 1
- spawnSync ENOENT HOT 3
- About the license of components invoked by this Project. HOT 1
- 开启 virtualHost 之后,无法获取组件实例 HOT 2
- 开启 virtualHost 单测环境中渲染结果与官网描述不一致 HOT 2
- 使用comp.triggerLifeTime('ready')或者其他功能时,微信官方api(非wx.xxx)无法成功调用 HOT 3
- 是否支持 selectOwnerComponent HOT 4
- 能不能给一个搭配vitest的示例?
- How config miniprogram-simulate in Alipay mini program HOT 3
- Uniapp 编写的小程序可以使用么 HOT 1
- 在调用comp.detach()后. jest测试框架 的test函数无效. 报错:NotFoundError: The node to be removed is not a child of this node. HOT 4
- 无法测试报错的情形啊 HOT 1
- 我这样试了下貌似没有出现你说的问题,有没有具体的 demo?
- 能否加入在使用Component API 建立page时,可测试页面组件特性 HOT 2
- 是否考虑增加对于 TS 的支持,目前组件文件的 ts 语法会报错 HOT 1
- 希望支持别名配置resolveAlias
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miniprogram-simulate.