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 b2a87f7

Browse filesBrowse files
kuriyoshtargos
authored andcommitted
test: add comments explaining _setSimultaneousAccepts deprecation tests
PR-URL: #41307 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent a11ff31 commit b2a87f7
Copy full SHA for b2a87f7

File tree

Expand file treeCollapse file tree

2 files changed

+12
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+12
-3
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-net-deprecated-setsimultaneousaccepts.js
+2Lines changed: 2 additions & 0 deletions
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');
Collapse file
+10-3Lines changed: 10 additions & 3 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.