node/test/parallel/test-buffer-new.js
Michaël Zasso 8699ecd340 test: improve coverage of the buffer module
Add tests for untested branches and statements.
Also convert some lines to const.

PR-URL: https://github.com/nodejs/node/pull/8552
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
2016-09-19 09:15:41 +02:00

8 lines
193 B
JavaScript

'use strict';
require('../common');
const assert = require('assert');
const Buffer = require('buffer').Buffer;
assert.throws(() => new Buffer(42, 'utf8'), /first argument must be a string/);