Skip to content

Commit

Permalink
test: remove unnecessary Buffer import
Browse files Browse the repository at this point in the history
Removed require('buffer') from

- test/disabled/test-sendfd.js
- test/internet/test-dgram-broadcast-multi-process.js
- test/pummel/test-https-no-reader.js

PR-URL: #13860
Refs: #13836
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Timothy Gu <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Alexey Orlenko <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
  • Loading branch information
swinston1000 authored and MylesBorins committed Aug 14, 2017
1 parent 366d1a8 commit b5d763f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
15 changes: 8 additions & 7 deletions test/disabled/test-sendfd.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@
var common = require('../common');
var assert = require('assert');

var buffer = require('buffer');
var child_process = require('child_process');
var fs = require('fs');
var net = require('net');
var netBinding = process.binding('net');
var path = require('path');
const buffer = require('buffer');
const child_process = require('child_process');
const fs = require('fs');
const net = require('net');

const netBinding = process.binding('net');
const path = require('path');

var DATA = {
'ppid' : process.pid,
Expand Down Expand Up @@ -91,7 +92,7 @@ var srv = net.createServer(function(s) {
var str = JSON.stringify(DATA) + '\n';

DATA.ord = DATA.ord + 1;
var buf = buffer.Buffer.allocUnsafe(str.length);
var buf = Buffer.allocUnsafe(str.length);
buf.write(JSON.stringify(DATA) + '\n', 'utf8');

s.write(str, 'utf8', pipeFDs[1]);
Expand Down
1 change: 0 additions & 1 deletion test/internet/test-dgram-broadcast-multi-process.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const assert = require('assert');
const dgram = require('dgram');
const util = require('util');
const networkInterfaces = require('os').networkInterfaces();
const Buffer = require('buffer').Buffer;
const fork = require('child_process').fork;
const LOCAL_BROADCAST_HOST = '255.255.255.255';
const TIMEOUT = common.platformTimeout(5000);
Expand Down
1 change: 0 additions & 1 deletion test/pummel/test-https-no-reader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ if (!common.hasCrypto) {
}
const https = require('https');

const Buffer = require('buffer').Buffer;
const fs = require('fs');
const path = require('path');

Expand Down

0 comments on commit b5d763f

Please sign in to comment.