Skip to content

Commit

Permalink
test: remove require('buffer') from 4 buffer tests
Browse files Browse the repository at this point in the history
Remove superfluous import from:

* test/parallel/test-buffer-alloc.js
* test/parallel/test-buffer-arraybuffer.js
* test/parallel/test-buffer-badhex.js
* test/parallel/test-buffer-bytelength.js

Refs: #13836
PR-URL: #13855
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
OriLev authored and addaleax committed Jul 18, 2017
1 parent 4a66041 commit c3c6699
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 6 deletions.
4 changes: 1 addition & 3 deletions test/parallel/test-buffer-alloc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ const common = require('../common');
const assert = require('assert');
const vm = require('vm');

const buffer = require('buffer');
const Buffer = buffer.Buffer;
const SlowBuffer = buffer.SlowBuffer;
const SlowBuffer = require('buffer').SlowBuffer;


const b = Buffer.allocUnsafe(1024);
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-buffer-arraybuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require('../common');
const assert = require('assert');

const Buffer = require('buffer').Buffer;
const LENGTH = 16;

const ab = new ArrayBuffer(LENGTH);
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-buffer-badhex.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';
require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;

// Test hex strings and bad hex strings
{
Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-buffer-bytelength.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;
const SlowBuffer = require('buffer').SlowBuffer;
const vm = require('vm');

Expand Down

0 comments on commit c3c6699

Please sign in to comment.