Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[test] Fix faulty test
  • Loading branch information
lpinca committed Mar 6, 2018
1 parent 3f80ab7 commit fb05059
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions test/websocket-server.test.js
Expand Up @@ -494,10 +494,7 @@ describe('WebSocketServer', function () {
const wss = new WebSocket.Server({
verifyClient: (info) => {
assert.strictEqual(info.origin, 'https://example.com');
assert.strictEqual(
info.req.headers['sec-websocket-key'],
'dGhlIHNhbXBsZSBub25jZQ=='
);
assert.strictEqual(info.req.headers.foo, 'bar');
assert.ok(info.secure, true);
return true;
},
Expand All @@ -511,10 +508,7 @@ describe('WebSocketServer', function () {

server.listen(0, () => {
const ws = new WebSocket(`wss://localhost:${server.address().port}`, {
headers: {
'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==',
Origin: 'https://example.com'
},
headers: { Origin: 'https://example.com', foo: 'bar' },
rejectUnauthorized: false
});
});
Expand Down

0 comments on commit fb05059

Please sign in to comment.