2016-09-15 21:11:44 +02:00
|
|
|
'use strict';
|
|
|
|
|
2017-06-28 23:58:39 -04:00
|
|
|
const common = require('../common');
|
2016-09-15 21:11:44 +02:00
|
|
|
const assert = require('assert');
|
|
|
|
|
2017-06-28 23:58:39 -04:00
|
|
|
assert.throws(() => new Buffer(42, 'utf8'), common.expectsError({
|
2017-07-25 10:37:08 -07:00
|
|
|
code: 'ERR_INVALID_ARG_TYPE',
|
|
|
|
type: TypeError,
|
|
|
|
message: 'The "string" argument must be of type string. Received type number'
|
2017-06-28 23:58:39 -04:00
|
|
|
}));
|