| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a11ff31 commit b2a87f7
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,8 @@ | |||
| 1 | 1 | // Flags: --no-warnings | |
| 2 | 2 | 'use strict'; | |
| 3 | 3 | ||
| 4 | + // Test that DEP0121 is emitted on the first call of _setSimultaneousAccepts(). | ||
| 5 | + | ||
| 4 | 6 | const { | |
| 5 | 7 | expectWarning | |
| 6 | 8 | } = require('../common'); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,19 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | ||
| 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 | + | ||
| 3 | 10 | const { expectWarning } = require('../common'); | |
| 4 | - const net = require('net'); | ||
| 11 | + const { _setSimultaneousAccepts } = require('net'); | ||
| 5 | 12 | ||
| 6 | 13 | expectWarning( | |
| 7 | 14 | 'DeprecationWarning', | |
| 8 | 15 | 'net._setSimultaneousAccepts() is deprecated and will be removed.', | |
| 9 | 16 | 'DEP0121'); | |
| 10 | 17 | ||
| 11 | - net._setSimultaneousAccepts(); | ||
| 12 | - net._setSimultaneousAccepts(); | ||
| 18 | + _setSimultaneousAccepts(); | ||
| 19 | + _setSimultaneousAccepts(); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments