Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6a00029

Browse filesBrowse files
committed
[test] Increase code coverage
1 parent ddfe4a8 commit 6a00029
Copy full SHA for 6a00029

File tree

3 files changed

+7
-1
lines changed
Filter options

3 files changed

+7
-1
lines changed

‎lib/sender.js

Copy file name to clipboardExpand all lines: lib/sender.js
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,12 @@ class Sender {
8080
options.generateMask(mask);
8181
} else {
8282
if (randomPoolPointer === RANDOM_POOL_SIZE) {
83+
/* istanbul ignore else */
8384
if (randomPool === undefined) {
85+
//
86+
// This is lazily initialized because server-sent frames must not
87+
// be masked so it may never be used.
88+
//
8489
randomPool = Buffer.alloc(RANDOM_POOL_SIZE);
8590
}
8691

‎test/receiver.test.js

Copy file name to clipboardExpand all lines: test/receiver.test.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ describe('Receiver', () => {
11271127
receiver.on('ping', listener);
11281128
receiver.on('pong', listener);
11291129

1130-
receiver.write(Buffer.from('8101318901328a0133810134', 'hex'));
1130+
receiver.write(Buffer.from('8101318901328a0133820134', 'hex'));
11311131
});
11321132

11331133
it('does not swallow errors thrown from event handlers', (done) => {

‎test/websocket.test.js

Copy file name to clipboardExpand all lines: test/websocket.test.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4423,6 +4423,7 @@ describe('WebSocket', () => {
44234423
'The socket was closed while data was being compressed'
44244424
);
44254425
});
4426+
ws.close();
44264427
});
44274428
}
44284429
);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.