-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用comp.triggerLifeTime('ready')或者其他功能时,微信官方api(非wx.xxx)无法成功调用 #103
Comments
这是只针对第三方自定义组件的单测,也就是提供了一个组件系统,跑在非微信环境,所有的 wx 等官方特有接口需要自己模拟返回。完整小程序的测试,可使用小程序自动化方案:https://developers.weixin.qq.com/miniprogram/dev/devtools/auto/ 或者使用云测的自定义测试方案:https://developers.weixin.qq.com/miniprogram/dev/devtools/minitest/ |
看到了文档中针对wx.xxx的自定义返回,但是非wx的官方接口模拟可以给个简单的例子吗? |
跟 wx 一样,你挂在 global 上就行。 |
如业务侧在ready的生命周期中使用 getCurrentPages()等微信api时,测试不会顺利进行。
![image](https://user-images.githubusercontent.com/51987848/215425300-925114df-49be-4d1a-9065-c04e6ed2cf4a.png)
请问是缺少某些配置么? 因为小程序项目中不可避免使用微信官方api(非wx.xxx),感觉不应该不支持才对..
The text was updated successfully, but these errors were encountered: