• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2
3const common = require('../common');
4const assert = require('assert');
5const util = require('util');
6
7[1, true, false, null, {}].forEach((notString) => {
8  assert.throws(() => util.deprecate(() => {}, 'message', notString), {
9    code: 'ERR_INVALID_ARG_TYPE',
10    name: 'TypeError',
11    message: 'The "code" argument must be of type string.' +
12             common.invalidArgTypeHelper(notString)
13  });
14});
15