{"action":"created","issue":{"url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate/issues/1","repository_url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate","labels_url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate/issues/1/comments","events_url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate/issues/1/events","html_url":"https://github.com/wechat-miniprogram/miniprogram-simulate/issues/1","id":389660516,"node_id":"MDU6SXNzdWUzODk2NjA1MTY=","number":1,"title":"建议将开发者工具的wx.request实现拿出来","user":{"login":"bigmeow","id":10484248,"node_id":"MDQ6VXNlcjEwNDg0MjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/10484248?v=4","gravatar_id":"","url":"https://api.github.com/users/bigmeow","html_url":"https://github.com/bigmeow","followers_url":"https://api.github.com/users/bigmeow/followers","following_url":"https://api.github.com/users/bigmeow/following{/other_user}","gists_url":"https://api.github.com/users/bigmeow/gists{/gist_id}","starred_url":"https://api.github.com/users/bigmeow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bigmeow/subscriptions","organizations_url":"https://api.github.com/users/bigmeow/orgs","repos_url":"https://api.github.com/users/bigmeow/repos","events_url":"https://api.github.com/users/bigmeow/events{/privacy}","received_events_url":"https://api.github.com/users/bigmeow/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-11T09:09:52Z","updated_at":"2018-12-11T11:39:22Z","closed_at":null,"author_association":"NONE","body":"其它api都好模拟，唯独request复杂许多，特别是针对微信请求新开发一个请求库的时候，比如我仓库的axios for小程序库。\r\n自己模拟的话感觉这个测试觉得有些自欺欺人，建议将小程序开发者工具的wx.request实现源码剥离放出来（可能需要跨部门协商？）"},"comment":{"url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate/issues/comments/446172590","html_url":"https://github.com/wechat-miniprogram/miniprogram-simulate/issues/1#issuecomment-446172590","issue_url":"https://api.github.com/repos/wechat-miniprogram/miniprogram-simulate/issues/1","id":446172590,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjE3MjU5MA==","user":{"login":"JuneAndGreen","id":7931744,"node_id":"MDQ6VXNlcjc5MzE3NDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/7931744?v=4","gravatar_id":"","url":"https://api.github.com/users/JuneAndGreen","html_url":"https://github.com/JuneAndGreen","followers_url":"https://api.github.com/users/JuneAndGreen/followers","following_url":"https://api.github.com/users/JuneAndGreen/following{/other_user}","gists_url":"https://api.github.com/users/JuneAndGreen/gists{/gist_id}","starred_url":"https://api.github.com/users/JuneAndGreen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JuneAndGreen/subscriptions","organizations_url":"https://api.github.com/users/JuneAndGreen/orgs","repos_url":"https://api.github.com/users/JuneAndGreen/repos","events_url":"https://api.github.com/users/JuneAndGreen/events{/privacy}","received_events_url":"https://api.github.com/users/JuneAndGreen/received_events","type":"User","site_admin":false},"created_at":"2018-12-11T11:39:22Z","updated_at":"2018-12-11T11:39:22Z","author_association":"CONTRIBUTOR","body":"开发者工具的实现是提供的类似客户端的接口暴露给基础库调用，所以无法很好的剥离出来。这个测试集更多的是针对自定义组件的单元测试，所以侧重点并不在 wx.request 上。如果希望有真实请求的话，倒是可以使用 request、axios 等现有的 nodejs 端的库来模拟。\r\n\r\n如果要过集成测试的话，可以尝试下这个：https://developers.weixin.qq.com/miniprogram/dev/devtools/monkey-test.html"}}
{"actor":{"display_login":"JuneAndGreen"}}