Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
fix test case for url (#624)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarindr authored Jan 7, 2019
1 parent 0db9bc6 commit 8fbd750
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions apps/admin_panel/assets/src/socket/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import CONSTANT from '../constants'
import uuid from 'uuid/v4'
class SocketConnector {
constructor (url, params = {}) {
if (!url) {
throw new Error('socket URL is not provided.')
}
this.socket = null
this.url = this.normalizeUrl(url)
this.params = Object.assign(params, {
Expand Down
2 changes: 1 addition & 1 deletion apps/admin_panel/assets/src/socket/connector.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import SocketConnector from './connector'
describe('websocket', () => {
const socket = new SocketConnector()
const socket = new SocketConnector('url')
class MockWebSocket {
constructor () {
this.events = {}
Expand Down

0 comments on commit 8fbd750

Please sign in to comment.