Skip to content

Commit 164c2b8

Browse files
authored
test: add test for warnings
1 parent 0c3b6ef commit 164c2b8

11 files changed

+65
-5
lines changed

lib/_http_agent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ module.exports = {
2828
globalAgent,
2929
};
3030

31-
process.emitWarning('The _http_agent module is deprecated.',
31+
process.emitWarning('The _http_agent module is deprecated. Use `node:http` instead.',
3232
'DeprecationWarning', 'DEP0195');

lib/_http_client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ module.exports = {
2727
ClientRequest,
2828
};
2929

30-
process.emitWarning('The _http_client module is deprecated.',
30+
process.emitWarning('The _http_client module is deprecated. Use `node:http` instead.',
3131
'DeprecationWarning', 'DEP0195');

lib/_http_incoming.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ module.exports = {
2929
readStop,
3030
};
3131

32-
process.emitWarning('The _http_incoming module is deprecated.',
32+
process.emitWarning('The _http_incoming module is deprecated. Use `node:http` instead.',
3333
'DeprecationWarning', 'DEP0194');

lib/_http_outgoing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,5 @@ module.exports = {
3939
OutgoingMessage,
4040
};
4141

42-
process.emitWarning('The _http_outgoing module is deprecated.',
42+
process.emitWarning('The _http_outgoing module is deprecated. Use `node:http` instead.',
4343
'DeprecationWarning', 'DEP0195');

lib/_http_server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,5 @@ module.exports = {
4646
kConnectionsCheckingInterval,
4747
};
4848

49-
process.emitWarning('The _http_server module is deprecated.',
49+
process.emitWarning('The _http_server module is deprecated. Use `node:http` instead.',
5050
'DeprecationWarning', 'DEP0195');
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// _http_agent is deprecated.
6+
7+
common.expectWarning('DeprecationWarning',
8+
'The _http_agent module is deprecated. Use `node:http` instead.', 'DEP0195');
9+
10+
require('_http_agent');
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// _http_client is deprecated.
6+
7+
common.expectWarning('DeprecationWarning',
8+
'The _http_client module is deprecated. Use `node:http` instead.', 'DEP0195');
9+
10+
require('_http_client');
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// _http_common is deprecated.
6+
7+
common.expectWarning('DeprecationWarning',
8+
'The _http_client module is deprecated.', 'DEP0195');
9+
10+
require('_http_common');
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// _http_incoming is deprecated.
6+
7+
common.expectWarning('DeprecationWarning',
8+
'The _http_incoming module is deprecated. Use `node:http` instead.', 'DEP0195');
9+
10+
require('_http_incoming');
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
5+
// _http_outgoing is deprecated.
6+
7+
common.expectWarning('DeprecationWarning',
8+
'The _http_outgoing module is deprecated. Use `node:http` instead.', 'DEP0195');
9+
10+
require('_http_outgoing');

0 commit comments

Comments
 (0)