Skip to content

Commit b2a87f7

Browse files
kuriyoshtargos
authored andcommitted
test: add comments explaining _setSimultaneousAccepts deprecation tests
PR-URL: #41307 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
1 parent a11ff31 commit b2a87f7

2 files changed

+12
-3
lines changed

test/parallel/test-net-deprecated-setsimultaneousaccepts.js

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Flags: --no-warnings
22
'use strict';
33

4+
// Test that DEP0121 is emitted on the first call of _setSimultaneousAccepts().
5+
46
const {
57
expectWarning
68
} = require('../common');
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
'use strict';
22

3+
// Test that DEP0121 is emitted only once if _setSimultaneousAccepts() is called
4+
// more than once. This test is similar to
5+
// test-net-deprecated-setsimultaneousaccepts.js, but that test calls
6+
// _setSimultaneousAccepts() only once. Unlike this test, that will confirm
7+
// that the warning is emitted on the first call. This test doesn't check which
8+
// call caused the warning to be emitted.
9+
310
const { expectWarning } = require('../common');
4-
const net = require('net');
11+
const { _setSimultaneousAccepts } = require('net');
512

613
expectWarning(
714
'DeprecationWarning',
815
'net._setSimultaneousAccepts() is deprecated and will be removed.',
916
'DEP0121');
1017

11-
net._setSimultaneousAccepts();
12-
net._setSimultaneousAccepts();
18+
_setSimultaneousAccepts();
19+
_setSimultaneousAccepts();

0 commit comments

Comments
 (0)