summaryrefslogtreecommitdiff
path: root/test/parallel/test-http-response-statuscode.js
Commit message (Collapse)AuthorAgeFilesLines
* test: refactor test-http-response-statuscodeRich Trott2017-02-121-42/+20
| | | | | | | | | | | | * move repeated code to function * use strings for expected error (exposes result for [] as empty string) * remove unneeded `common.mustCall()` usage with function arguments that are not callbacks PR-URL: https://github.com/nodejs/node/pull/11274 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
* http: include provided status code in range errorcjihrig2017-02-091-10/+10
| | | | | | | | | | | ServerResponse#writeHead() coerces the user provided status code to a number and then performs a range check. If the check fails, a range error is thrown. The coerced status code is included in the error message. This commit uses the user provided status code instead. PR-URL: https://github.com/nodejs/node/pull/11221 Reviewed-By: James M Snell <jasnell@gmail.com>
* test: add test case to test-http-response-statuscode.jsabouthiroppy2017-01-161-13/+22
| | | | | | | | | | Change regular expression of error message. Add test case(`res.writeHead()`). PR-URL: https://github.com/nodejs/node/pull/10808 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
* test: use eslint to fix var->const/letGibson Fahnestock2017-01-111-1/+1
| | | | | | | | | 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>
* test: fix misplaced ) in http response statuscode testNathan Friedly2017-01-101-12/+12
| | | | | | | | | | | | | | This fixes a misplaced parenthesis in each of the tests in test/parallel/test-http-response-statuscodes.js, causing the tests to pass as long as any error was thrown, without validating the error message. PR-URL: https://github.com/nodejs/node/pull/10692 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michal Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* test: remove blank lines at end of filesRich Trott2016-10-051-1/+0
| | | | | | | | | | | | | | | | | | | In preparation for a lint rule that disallows empty lines at the end of a file, remove such lines from a number of test files. Refs: https://github.com/nodejs/node/issues/8918 PR-URL: https://github.com/nodejs/node/pull/8920 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Brian White <mscdex@mscdex.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
* http: disallow sending obviously invalid status codesBrian White2016-04-201-0/+92
PR-URL: https://github.com/nodejs/node/pull/6291 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>