Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 55ba1d4

Browse filesBrowse files
akailagibfahn
authored andcommitted
util: expand test coverage for util.deprecate
Test for invalid argument types passed to code on util.deprecate. PR-URL: #16305 Backport-PR-URL: #16430 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent a6b3cd8 commit 55ba1d4
Copy full SHA for 55ba1d4

File tree

Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-0
lines changed
Open diff view settings
Collapse file
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.