mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
24f4f7f6e2
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>
20 lines
687 B
JavaScript
20 lines
687 B
JavaScript
'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 { _setSimultaneousAccepts } = require('net');
|
|
|
|
expectWarning(
|
|
'DeprecationWarning',
|
|
'net._setSimultaneousAccepts() is deprecated and will be removed.',
|
|
'DEP0121');
|
|
|
|
_setSimultaneousAccepts();
|
|
_setSimultaneousAccepts();
|