import { expect } from 'chai'

import WebsocketClientPlugin from '../../src/plugin/wsclient'

/** @test {WebsocketClientPlugin} */
describe('WebsocketClientPlugin', () => {
  let plugin

  before(() => {
    plugin = new WebsocketClientPlugin({
      udpServer: {
        port: 8129,
      },
      wsServer: {
        host: '127.0.0.1',
      },
    })
  })

  it('merges the given options correctly', () => {
    expect(plugin.options.udpServer.port).to.be.equals(8129)
    expect(plugin.options.wsServer.host).to.be.equals('127.0.0.1')
  })

  describe('status', () => {
    it('returns the initial status', () => {
      expect(plugin.status()).to.be.equals(-1)
    })
  })
})


@@ -248,70 +248,20 @@
     
-udpServer: %7B%0A        port: 8129,%0A      %7D,%0A      wsServer: %7B%0A  
+port: 8129,%0A
     
@@ -285,17 +285,8 @@
 1',%0A
-      %7D,%0A
     
@@ -375,18 +375,8 @@
 ons.
-udpServer.
 port
@@ -426,17 +426,8 @@
 ons.
-wsServer.
 host
@@ -454,16 +454,70 @@
 0.0.1')%0A
+    expect(plugin.options.secure).to.be.equals(false)%0A
   %7D)%0A%0A  

Fix wsclient plugin test