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/06/26 09:13:56 UTC

[6/9] incubator-weex git commit: + [html5] add unit test for webSocket module

+ [html5] add unit test for webSocket module


Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/323b8367
Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/323b8367
Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/323b8367

Branch: refs/heads/0.14-dev
Commit: 323b836731f4d66a0b5836aa4ab82bc3cfa43b0a
Parents: dfc5d31
Author: erha19 <fa...@gmail.com>
Authored: Fri Jun 23 16:23:24 2017 +0800
Committer: erha19 <fa...@gmail.com>
Committed: Fri Jun 23 16:23:24 2017 +0800

----------------------------------------------------------------------
 html5/test/render/vue/modules/websocket.js | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/323b8367/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
new file mode 100644
index 0000000..28b5958
--- /dev/null
+++ b/html5/test/render/vue/modules/websocket.js
@@ -0,0 +1,11 @@
+import websocket from '../../../../render/vue/modules/websocket/websocket';
+describe('webSocket module', function() {
+  afterEach(function(done) {
+    // Cleanup
+    websocket.close();
+    done();
+  });
+  it('should have connection lifecycle constants defined on the instance', () => {
+    expect(websocket.WebSocket('wss://echo.websocket.org').CONNECTING).to.be.equal(0);
+  });
+});