Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove duplicate test about warning in lib/net.js #41307

Merged
merged 4 commits into from
Dec 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/parallel/test-net-deprecated-setsimultaneousaccepts.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Flags: --no-warnings
'use strict';

// Test that DEP0121 is emitted on the first call of _setSimultaneousAccepts().

const {
expectWarning
} = require('../common');
Expand Down
Original file line number Diff line number Diff line change
@@ -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');

Trott marked this conversation as resolved.
Show resolved Hide resolved
net._setSimultaneousAccepts();
net._setSimultaneousAccepts();
_setSimultaneousAccepts();
_setSimultaneousAccepts();