Skip to content

Commit

Permalink
test: add test for _setSimultaneousAccepts()
Browse files Browse the repository at this point in the history
Add a test case that verifies that calling _setSimultaneousAccepts()
function twice does not trigger the deprecation warning twice.

PR-URL: #24180
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
melikhov-dev authored and gireeshpunathil committed Nov 13, 2018
1 parent 531d854 commit 3235d31
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

const { expectWarning } = require('../common');
const net = require('net');

expectWarning(
'DeprecationWarning',
'net._setSimultaneousAccepts() is deprecated and will be removed.',
'DEP0121');

net._setSimultaneousAccepts();
net._setSimultaneousAccepts();

0 comments on commit 3235d31

Please sign in to comment.