0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/parallel/test-buffer-new.js
Mithun Sasidharan 146a9b1a8a
test: replace assert.throws w/ common.expectsError
PR-URL: https://github.com/nodejs/node/pull/17483
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-12-08 16:23:32 -05:00

10 lines
240 B
JavaScript

'use strict';
const common = require('../common');
common.expectsError(() => new Buffer(42, 'utf8'), {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "string" argument must be of type string. Received type number'
});