blob: 057e095424dd3fb5edd9f51b296073484b4b20cb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
'use strict';
const common = require('../common');
const util = require('util');
[1, true, false, null, {}].forEach((notString) => {
common.expectsError(() => util.deprecate(() => {}, 'message', notString), {
code: 'ERR_INVALID_ARG_TYPE',
type: TypeError,
message: 'The "code" argument must be of type string'
});
});
|