mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
test: add comments explaining _setSimultaneousAccepts deprecation tests
PR-URL: https://github.com/nodejs/node/pull/41307 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
1 parent
ffca1a71ce
commit
8d15bacf2b
2 files changed
+12
-3
No files matched your search
@@ -1,6 +1,8 @@
|
||||
// Flags: --no-warnings
|
||||
'use strict';
|
||||
|
||||
// Test that DEP0121 is emitted on the first call of _setSimultaneousAccepts().
|
||||
|
||||
const {
|
||||
expectWarning
|
||||
} = require('../common');
|
||||
|
||||
@@ -1,12 +1,19 @@
|
||||
'use strict';
|
||||
|
||||
// Test that DEP0121 is emitted only once if _setSimultaneousAccepts() is called
|
||||
// more than once. This test is similar to
|
||||
// test-net-deprecated-setsimultaneousaccepts.js, but that test calls
|
||||
// _setSimultaneousAccepts() only once. Unlike this test, that will confirm
|
||||
// that the warning is emitted on the first call. This test doesn't check which
|
||||
// call caused the warning to be emitted.
|
||||
|
||||
const { expectWarning } = require('../common');
|
||||
const net = require('net');
|
||||
const { _setSimultaneousAccepts } = require('net');
|
||||
|
||||
expectWarning(
|
||||
'DeprecationWarning',
|
||||
'net._setSimultaneousAccepts() is deprecated and will be removed.',
|
||||
'DEP0121');
|
||||
|
||||
net._setSimultaneousAccepts();
|
||||
net._setSimultaneousAccepts();
|
||||
_setSimultaneousAccepts();
|
||||
_setSimultaneousAccepts();
|
||||
Reference in new issue
Block a user