-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add support for weapp #653
Conversation
I'm a bit lost in what is weapp, wx and such. |
|
Codecov Report
@@ Coverage Diff @@
## master #653 +/- ##
==========================================
- Coverage 93.22% 89.73% -3.49%
==========================================
Files 8 9 +1
Lines 664 760 +96
Branches 160 198 +38
==========================================
+ Hits 619 682 +63
- Misses 45 78 +33
Continue to review full report at Codecov.
|
@mcollina What can I do with the failled checks? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not landing code without unit test. So, we should change the approach:
how about we add support so that you can specificy a custom protocol? That would probably help.
Also, why lib/connect/index.js
look all rewritten? Maybe spacing?
Then could I add some unit test with failing judge? I think there are so many chinese programmer would need this. |
@@ -17,6 +17,5 @@ | |||
"mocha": true, | |||
"indent": 2, | |||
"latedef": true, | |||
"immed": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was defined multi times. see line 4
Unit tests will be good? |
I don't know how to add unit test yet, but I would try my best. |
I have done some test, not unit test, it works good. |
@mcollina so need I add unit test for this pr? |
Yes. |
Hi, @mcollina , I have add some test into |
Whatever I try, still could pass |
I'll merge this. However, can you please restore |
lib/connect/index.js
Outdated
} | ||
|
||
protocols.wx = require('./wx') | ||
protocols.wxs = require('./wx') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should not be adding wx
if it's not a browser. the main wx
object is not there.
@mcollina , Thanks, I move the code into |
You can remove the skipped tests. What have you changed to the lib/connect/index.js file? GH reports it was all changed, but it does not seems so. Can you please restore it to what was before and apply only your modifications? |
I tried not skip the tests and it will cause a failing test after that test. 189 passing (18s)
1 failing
1) MqttSecureClient pinging should reconnect if pingresp is not sent:
Uncaught Error: connect ECONNREFUSED 127.0.0.1:8883
at Object.exports._errnoException (util.js:1024:11)
at exports._exceptionWithHostPort (util.js:1047:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1150:14) I don't really know what was wrong with github, I had not changed the whole file |
@taoqf 在微信小程序里怎么使用mqtt连接AZURE?我已经在nodejs中联通了iot云,但是想在小程序中看到各设备的消息?如何实现? |
Could you please describe azure? |
For now, if using with webpack, need wait for browserify/timers-browserify#24 and max-mapper/websocket-stream#129 merged.