We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a6b3cd8 commit 55ba1d4Copy full SHA for 55ba1d4
test/parallel/test-util-deprecate-invalid-code.js
@@ -0,0 +1,11 @@
1
+'use strict';
2
+
3
+const common = require('../common');
4
+const util = require('util');
5
6
+[1, true, false, null, {}].forEach((notString) => {
7
+ common.expectsError(() => util.deprecate(() => {}, 'message', notString), {
8
+ type: TypeError,
9
+ message: '`code` argument must be a string'
10
+ });
11
+});
0 commit comments