Skip to content

Commit f7d7ae7

Browse files
committed
fix(websocket-disconnect-error): unskip all ws tests
1 parent ac3680a commit f7d7ae7

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

test/websocket.test.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,22 @@ test.beforeEach(async t => {
7070
})
7171

7272
/*********** Test connects to server (no callback) [MOCK] ***********/
73-
test.cb.skip('Successfully connects to Websocket Server - no callback', t => {
73+
test.cb('Successfully connects to Websocket Server - no callback', t => {
7474
t.context.wss.on('connection', () => t.end())
7575
t.context.w3d.connect()
7676
t.timeout(TEST_TIMEOUT)
7777
})
7878

7979
/*********** Test connects to server (with callback) [MOCK] ***********/
80-
test.cb.skip('Successfully connects to Websocket Server - with callback', t => {
80+
test.cb('Successfully connects to Websocket Server - with callback', t => {
8181
t.plan(2)
8282
t.context.wss.on('connection', () => {t.pass()})
8383
t.context.w3d.connect(() => {t.pass(); t.end()})
8484
t.timeout(TEST_TIMEOUT)
8585
})
8686

8787
/*********** Test reconnects to server on error (no callback) [MOCK] ***********/
88-
test.cb.skip('Successfully reconnects to Websocket Server on error 3 times', t => {
88+
test.cb('Successfully reconnects to Websocket Server on error 3 times', t => {
8989
let reconnects = 0
9090
t.context.wss.on('connection', ws => {
9191
if(++reconnects > 3) {
@@ -101,7 +101,7 @@ test.cb.skip('Successfully reconnects to Websocket Server on error 3 times', t
101101
})
102102

103103
/*********** Test disconnect from server (no callback) [MOCK] ***********/
104-
test.cb.skip('Successfully disconnects from Websocket Server - no callback', t => {
104+
test.cb('Successfully disconnects from Websocket Server - no callback', t => {
105105
t.context.wss.on('connection', (ws) => {
106106
ws.on('close', () => t.end())
107107
});
@@ -112,7 +112,7 @@ test.cb.skip('Successfully disconnects from Websocket Server - no callback', t
112112
})
113113

114114
/*********** Test disconnect from server (with callback) [MOCK] ***********/
115-
test.cb.skip('Successfully disconnects from Websocket Server - with callback', t => {
115+
test.cb('Successfully disconnects from Websocket Server - with callback', t => {
116116
t.plan(2)
117117
t.context.wss.on('connection', (ws) => {
118118
ws.on('close', () => {t.pass(); t.end()})
@@ -124,7 +124,7 @@ test.cb.skip('Successfully disconnects from Websocket Server - with callback',
124124
})
125125

126126
/*********** Test call disconnect before connect errors [LIVE, MOCK] ***********/
127-
test.cb.skip('disconnect logs error if called before connect', t => {
127+
test.cb('disconnect logs error if called before connect', t => {
128128
const stderr = capcon.captureStderr(() => {
129129
t.context.w3d.disconnect()
130130
t.end()
@@ -134,7 +134,7 @@ test.cb.skip('disconnect logs error if called before connect', t => {
134134
})
135135

136136
/*********** Test on method sends sub method - without filters [MOCK] ***********/
137-
test.cb.skip('Successfully calls on and sends subscription message - without filters', t => {
137+
test.cb('Successfully calls on and sends subscription message - without filters', t => {
138138
t.context.wss.on('connection', (ws) => {
139139
ws.on('message', (message) => {
140140
t.regex(message, SUBSCRIBE_MESSAGE)
@@ -147,7 +147,7 @@ test.cb.skip('Successfully calls on and sends subscription message - without fil
147147
})
148148

149149
/*********** Test on method sends sub message - with filters [MOCK] ***********/
150-
test.cb.skip('Successfully calls on and sends subscription message - with filters', t => {
150+
test.cb('Successfully calls on and sends subscription message - with filters', t => {
151151

152152
/* Regex matches the following string as long as id contains 1 > characters */
153153
const SUBSCRIBE_MESSAGE = /{"jsonrpc":"2\.0","method":"subscribe","id":".+","params":\["block",{"number":7280000}\]}/g
@@ -164,7 +164,7 @@ test.cb.skip('Successfully calls on and sends subscription message - with filter
164164
})
165165

166166
/*********** Test on method errors if no event name [LIVE, MOCK] ***********/
167-
test.cb.skip('on method errors if called without an event name', t => {
167+
test.cb('on method errors if called without an event name', t => {
168168
t.context.wss.on('connection', ()=>{})
169169
const stderr = capcon.captureStderr(() => {
170170
t.context.w3d.on({}, status => status)
@@ -175,7 +175,7 @@ test.cb.skip('on method errors if called without an event name', t => {
175175
})
176176

177177
/*********** Test off method sends unsub message - without filters [MOCK] ***********/
178-
test.cb.skip('Successfully calls off and sends unsubscription message - without filters', t => {
178+
test.cb('Successfully calls off and sends unsubscription message - without filters', t => {
179179

180180
t.context.wss.on('connection', (ws) => {
181181
ws.on('message', (message) => {
@@ -198,7 +198,7 @@ test.cb.skip('Successfully calls off and sends unsubscription message - without
198198
})
199199

200200
/*********** Test off method sends unsub message - with filters [MOCK] ***********/
201-
test.cb.skip('Successfully calls off and sends unsubscription message - with filters', t => {
201+
test.cb('Successfully calls off and sends unsubscription message - with filters', t => {
202202
t.context.wss.on('connection', (ws) => {
203203
ws.on('message', (message) => {
204204
const data = JSON.parse(message);
@@ -221,7 +221,7 @@ test.cb.skip('Successfully calls off and sends unsubscription message - with fil
221221

222222

223223
/*********** Test off errors if called before on [LIVE, MOCK] ***********/
224-
test.cb.skip('Calling off before on errors', t => {
224+
test.cb('Calling off before on errors', t => {
225225
t.context.wss.on('connection', () => {})
226226
t.context.w3d.connect()
227227
const stderr = capcon.captureStderr(function scope() {
@@ -255,7 +255,7 @@ test.cb.skip('Successfully handles erroneous server response', t => {
255255
})
256256

257257
/*********** Test client receives and outputs data via callback [LIVE, MOCK] ***********/
258-
test.cb.skip('Successfully subscribes, receives, and outputs data', t => {
258+
test.cb('Successfully subscribes, receives, and outputs data', t => {
259259
t.context.wss.on('connection', (ws) => {
260260
ws.on('message', (message) => {
261261
const data = JSON.parse(message);
@@ -272,7 +272,7 @@ test.cb.skip('Successfully subscribes, receives, and outputs data', t => {
272272
t.timeout(TEST_TIMEOUT)
273273
})
274274

275-
test.cb.skip('Successfully call once, outputs data and unsubscribes', t => {
275+
test.cb('Successfully call once, outputs data and unsubscribes', t => {
276276
t.context.wss.on('connection', (ws) => {
277277
ws.on('message', (message) => {
278278
const data = JSON.parse(message);

0 commit comments

Comments
 (0)