GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: add comments explaining _setSimultaneousAccepts deprecation tests · nodejs/node@b2a87f7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/parallel
    • test-net-deprecated-setsimultaneousaccepts.js
    • test-net-server-simultaneous-accepts-produce-warning-once.js
Expand file treeCollapse file tree
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

‎test/parallel/test-net-server-simultaneous-accepts-produce-warning-once.js‎

Copy file name to clipboard
+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)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.