Skip to content

Commit

Permalink
[test] Remove unneeded Buffer#slice() call
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Apr 15, 2020
1 parent bdfb987 commit 3bf4ac8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/websocket.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1219,9 +1219,10 @@ describe('WebSocket', () => {
}

const partial = array.subarray(2, 5);
const buf = Buffer.from(partial.buffer).slice(
const buf = Buffer.from(
partial.buffer,
partial.byteOffset,
partial.byteOffset + partial.byteLength
partial.byteLength
);

const ws = new WebSocket(`ws://localhost:${wss.address().port}`);
Expand Down

0 comments on commit 3bf4ac8

Please sign in to comment.