Skip to content

Commit

Permalink
lib: make internal API warning more direct
Browse files Browse the repository at this point in the history
Before:
These APIs are exposed only for testing and are not tracked by any
versioning system or deprecation process.

After:
These APIs are for internal testing only. Do not use them.

PR-URL: #25125
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
Reviewed-By: Daijiro Wachi <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Dec 26, 2018
1 parent 073a512 commit b3f45da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions lib/internal/test/binding.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';

process.emitWarning(
'These APIs are exposed only for testing and are not ' +
'tracked by any versioning system or deprecation process.',
'These APIs are for internal testing only. Do not use them.',
'internal/test/binding');

module.exports = { internalBinding };
3 changes: 1 addition & 2 deletions lib/internal/test/heap.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
'use strict';

process.emitWarning(
'These APIs are exposed only for testing and are not ' +
'tracked by any versioning system or deprecation process.',
'These APIs are for internal testing only. Do not use them.',
'internal/test/heap');

const { createHeapDump, buildEmbedderGraph } = internalBinding('heap_utils');
Expand Down
3 changes: 1 addition & 2 deletions test/parallel/test-dns-lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ cares.getaddrinfo = () => internalBinding('uv').UV_ENOENT;
common.expectWarning({
// For 'internal/test/binding' module.
'internal/test/binding': [
'These APIs are exposed only for testing and are not ' +
'tracked by any versioning system or deprecation process.'
'These APIs are for internal testing only. Do not use them.'
],
// For dns.promises.
'ExperimentalWarning': [
Expand Down

0 comments on commit b3f45da

Please sign in to comment.