aboutsummaryrefslogtreecommitdiff
path: root/test/parallel/test-c-ares.js
AgeCommit message (Collapse)Author
2018-10-13test: fix `assert.strictEqual` arguments in test/parallel/test-c-ares.jsjungkumseok
When using `assert.strictEqual`, the first argument must be the actual value and the second argument must be the expected value. PR-URL: https://github.com/nodejs/node/pull/23448 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
2018-07-19test: make crashOnUnhandleRejection opt-outMichaël Zasso
This commit removes `common.crashOnUnhandledRejection()` and adds `common.disableCrashOnUnhandledRejection()`. To reduce the risk of mistakes and make writing tests that involve promises simpler, always install the unhandledRejection hook in tests and provide a way to disable it for the rare cases where it's needed. PR-URL: https://github.com/nodejs/node/pull/21849 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-06-20dns: add promisified dns modulecjihrig
PR-URL: https://github.com/nodejs/node/pull/21264 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2017-07-24errors: migrate dns to use internal/errorsWeijia Wang
PR-URL: https://github.com/nodejs/node/pull/14212 Refs: https://github.com/nodejs/node/issues/11273 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
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.
2016-10-10test: various test improvementsJames M Snell
* Favor strictEqual * Use const where appropriate * Modernize where possible PR-URL: https://github.com/nodejs/node/pull/8468 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-09-20test: cleanup test-c-ares.jsYevgen Safronov
Replace equal with strictEqual, use const instead of var Replace throw error with assert.ifError PR-URL: https://github.com/nodejs/node/pull/8577 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
2016-03-22dns: Use object without protoype for mapBenjamin Gruenbaum
Currently we use `{}` for the `lookup` function to find the relevant resolver to the dns.resolve function. It is preferable to use an object without a Object.prototype, currently for example you can do something like: ```js dns.resolve("google.com", "toString", console.log); ``` And get `[Object undefined]` logged and the callback would never be called. This is unexpected and strange behavior in my opinion. In addition, if someone adds a property to `Object.prototype` might also create unexpected results. This pull request fixes it, with it an appropriate error is thrown. PR-URL: https://github.com/nodejs/node/pull/5843 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2016-02-08dns: add resolvePtr to query plain DNS PTR recordsDaniel Turing
Resolving plain PTR records is used beyond reverse DNS, most prominently with DNS-SD (RFC6763). This adds dns.resolvePtr(), and uses it (instead of dns.reverse()) in dns.resolve(). PR-URL: https://github.com/nodejs/node/pull/4921 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Brian White <mscdex@mscdex.net>
2015-07-31test: use common.isWindows consistentlySakthipriyan Vairamani
In the tests, we use "process.platform === 'win32'" in some places. This patch replaces them with the "common.isWindows" for consistency. PR-URL: https://github.com/nodejs/io.js/pull/2269 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.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-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