summaryrefslogtreecommitdiff
path: root/test/parallel/test-net-local-address-port.js
AgeCommit message (Collapse)Author
2017-03-10meta: restore original copyright headerJames M Snell
A prior io.js era commit inappropriately removed the original copyright statements from the source. This restores those in any files still remaining from that edit. Ref: https://github.com/nodejs/TSC/issues/174 Ref: https://github.com/nodejs/node/pull/10599 PR-URL: https://github.com/nodejs/node/pull/10155 Note: This PR was required, reviewed-by and approved by the Node.js Foundation Legal Committee and the TSC. There is no `Approved-By:` meta data.
2017-01-11test: use eslint to fix var->const/letGibson Fahnestock
Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2016-12-03test: update net-local-address-portscalkpdev
- changed var to const - changed assert.equal to assert.strictEqual PR-URL: https://github.com/nodejs/node/pull/9885 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
2016-07-18test: use mustCall() for simple flow trackingcjihrig
Many of the tests use variables to track when callback functions are invoked or events are emitted. These variables are then asserted on process exit. This commit replaces this pattern in straightforward cases with common.mustCall(). This makes the tests easier to reason about, leads to a net reduction in lines of code, and uncovered a few bugs in tests. This commit also replaces some callbacks that should never be called with common.fail(). PR-URL: https://github.com/nodejs/node/pull/7753 Reviewed-By: Wyatt Preul <wpreul@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2016-06-10test: use random ports where possibleBrian White
This helps to prevent issues where a failed test can keep a bound socket open long enough to cause other tests to fail with EADDRINUSE because the same port number is used. PR-URL: https://github.com/nodejs/node/pull/7045 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org>
2015-12-29test: remove unused variables from net testsRich Trott
Remove a handful of variables that are declared but never used in the tests for the net module. PR-URL: https://github.com/nodejs/node/pull/4430 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2015-05-19test: enable linting for testsRoman Reiss
Enable linting for the test directory. A number of changes was made so all tests conform the current rules used by lib and src directories. The only exception for tests is that unreachable (dead) code is allowed. test-fs-non-number-arguments-throw had to be excluded from the changes because of a weird issue on Windows CI. PR-URL: https://github.com/nodejs/io.js/pull/1721 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-03-19test: cache lazy properties, fix style nitsRod Vagg
inFreeBSDJail involves an execSync() and is used by localhost_ipv4 so will be unnecessarily expensive, so cache both values and reuse rather than re-evaluate each time. Renamed localhost_ipv4 to localhostIPv4 for style consistency. PR-URL: https://github.com/iojs/io.js/pull/1196 Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
2015-03-19test: Introduce knowledge of FreeBSD jailsJohan Bergström
FreeBSD jails act differently than your average vm or similar application container. All routing passes through one ip address, which makes things like localhost or 0.0.0.0 resolve differently. Introduce a helper that allows us to verify if we're in a jail and another one for returning an ip address for localhost. Also, skip one test instead of trading additional complexity in common.js for one specific user scenario. PR-URL: https://github.com/iojs/io.js/pull/1167 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
2015-01-12Remove excessive copyright/license boilerplateisaacs
The copyright and license notice is already in the LICENSE file. There is no justifiable reason to also require that it be included in every file, since the individual files are not individually distributed except as part of the entire package.
2014-12-17test: split test in parallel/sequentialFedor Indutny
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> PR-URL: https://github.com/iojs/io.js/pull/172 Fix: iojs/io.js#139