* [html5] update webSocket formate
Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/8a84fa6d Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/8a84fa6d Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/8a84fa6d Branch: refs/heads/0.15-dev Commit: 8a84fa6de3a68bfb4b990bf40c26e6e0025ae0e9 Parents: cfcf769 Author: erha19 <[email protected]> Authored: Thu Jul 13 14:30:22 2017 +0800 Committer: erha19 <[email protected]> Committed: Thu Jul 13 14:30:22 2017 +0800 ---------------------------------------------------------------------- html5/test/render/vue/modules/websocket.js | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/8a84fa6d/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 d5a3c0d..b07205e 100644 --- a/html5/test/render/vue/modules/websocket.js +++ b/html5/test/render/vue/modules/websocket.js @@ -18,9 +18,8 @@ */ import websocket from '../../../../render/vue/modules/websocket/websocket' const TestUrl = 'ws://echo.websocket.org' -/** @test {webSocket module} */ + /** @test {webSocket module} */ describe('webSocket module', () => { - describe('extends Standard WebSocket API', () => { context('should inherit', () => { let ws = null @@ -51,32 +50,28 @@ describe('webSocket module', () => { context('should forward native events', () => { let ws = null before(() => { - ws = websocket.WebSocket(TestUrl,'') + ws = websocket.WebSocket(TestUrl, '') }) after(() => { websocket.close() }) it('open', function () { - const open = () => { - } + const open = () => {} websocket.onopen = open expect(ws.onopen).to.be.deep.equal(open) }) it('close', function () { - const close = () => { - } + const close = () => {} websocket.onclose = close expect(ws.onclose).to.be.deep.equal(close) }) it('error', function () { - const error = () => { - } + const error = () => {} websocket.onerror = error expect(ws.onerror).to.be.deep.equal(error) }) it('message', function () { - const message = () => { - } + const message = () => {} websocket.onmessage = message expect(ws.onmessage).to.be.deep.equal(message) })
