Browse Source

test: remove `require('buffer')` from 4 test files

Remove superfluous import from:

* test/parallel/test-buffer-fakes.js
* test/parallel/test-buffer-includes.js
* test/parallel/test-buffer-indexof.js
* test/parallel/test-buffer-new.js

Refs: https://github.com/nodejs/node/issues/13836
PR-URL: https://github.com/nodejs/node/pull/13846
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Alexey Orlenko <eaglexrlnk@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jackson Tian <shyvo1987@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
v6.x
Zongmin Lei 8 years ago
committed by Myles Borins
parent
commit
fff0b83f1b
No known key found for this signature in database GPG Key ID: 933B01F40B5CA946
  1. 1
      test/parallel/test-buffer-fakes.js
  2. 2
      test/parallel/test-buffer-includes.js
  3. 2
      test/parallel/test-buffer-indexof.js
  4. 1
      test/parallel/test-buffer-new.js

1
test/parallel/test-buffer-fakes.js

@ -2,7 +2,6 @@
require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;
function FakeBuffer() { }
Object.setPrototypeOf(FakeBuffer, Buffer);

2
test/parallel/test-buffer-includes.js

@ -2,8 +2,6 @@
require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;
const b = Buffer.from('abcdef');
const buf_a = Buffer.from('a');
const buf_bc = Buffer.from('bc');

2
test/parallel/test-buffer-indexof.js

@ -2,8 +2,6 @@
require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;
const b = Buffer.from('abcdef');
const buf_a = Buffer.from('a');
const buf_bc = Buffer.from('bc');

1
test/parallel/test-buffer-new.js

@ -2,6 +2,5 @@
require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;
assert.throws(() => new Buffer(42, 'utf8'), /first argument must be a string/);

Loading…
Cancel
Save