You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by da...@apache.org on 2017/07/20 08:29:46 UTC
[16/50] incubator-weex git commit: * [html5] fix eslint wraning
* [html5] fix eslint wraning
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/a60c54fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/a60c54fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/a60c54fa
Branch: refs/heads/0.15-dev
Commit: a60c54facecf02e0c0926bd1a49c7c3e3ff1a00b
Parents: 75de22e
Author: erha19 <fa...@gmail.com>
Authored: Tue Jul 11 21:12:35 2017 +0800
Committer: erha19 <fa...@gmail.com>
Committed: Tue Jul 11 21:12:35 2017 +0800
----------------------------------------------------------------------
html5/render/vue/modules/websocket/websocket.js | 1 +
html5/test/render/vue/modules/websocket.js | 5 ++---
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a60c54fa/html5/render/vue/modules/websocket/websocket.js
----------------------------------------------------------------------
diff --git a/html5/render/vue/modules/websocket/websocket.js b/html5/render/vue/modules/websocket/websocket.js
index 6488cb8..e79f8de 100644
--- a/html5/render/vue/modules/websocket/websocket.js
+++ b/html5/render/vue/modules/websocket/websocket.js
@@ -19,6 +19,7 @@
/**
* websocket module
*/
+/*global WebSocket*/
export default (function () {
const registerListeners = ['onopen', 'onmessage', 'onerror', 'onclose']
const ws = {
http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/a60c54fa/html5/test/render/vue/modules/websocket.js
----------------------------------------------------------------------
diff --git a/html5/test/render/vue/modules/websocket.js b/html5/test/render/vue/modules/websocket.js
index 1a18294..487334a 100644
--- a/html5/test/render/vue/modules/websocket.js
+++ b/html5/test/render/vue/modules/websocket.js
@@ -16,7 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
-/*global WebSocket*/
import websocket from '../../../../render/vue/modules/websocket/websocket'
const TestUrl = 'ws://echo.websocket.org'
/** @test {webSocket module} */
@@ -47,7 +46,7 @@ describe('webSocket module', function () {
context('should forward native events', function () {
let ws = null
beforeEach(function () {
- ws = websocket.WebSocket(TestUrl,'')
+ ws = websocket.WebSocket(TestUrl, '')
})
afterEach(function () {
websocket.close()
@@ -64,7 +63,7 @@ describe('webSocket module', function () {
}
websocket.onmessage = function (e) {
expect(e.data).to.be.equal(message)
- websocket.close()
+ setTimeout(() => { websocket.close() }, 200)
}
websocket.onopen = function () {
websocket.send(message)