Ved Chaudhari
8cf60c5db1
querystring: fix value decoding after encoded keys
...
In the non-default parse() path, a key with more than one percent
escape could corrupt non-ASCII characters in its value.
Keep key characters out of the value's encoding check.
Assisted-by: claude:opus-5.5
Signed-off-by: vedchaudhari <vedc2853@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/66553
Refs: https://github.com/nodejs/node/pull/66175
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2026-10-13 07:48:55 +00:00
Jordan Harband
757c104147
tools: add prefer-proto rule
...
fixup: add support for `Object.create(null)`
fixup: extend to any 1-argument Object.create call
fixup: add tests
PR-URL: https://github.com/nodejs/node/pull/46083
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-01-10 05:38:36 +00:00
Rongjian Zhang
efd70f4361
test: complete coverage of querystring
...
PR-URL: https://github.com/nodejs/node/pull/38520
Refs: https://coverage.nodejs.org/coverage-68e6673224365120/lib/querystring.js.html#L179
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com >
Reviewed-By: Darshan Sen <raisinten@gmail.com >
2021-05-04 20:07:54 -07:00
Rich Trott
330f25ef82
test: prepare for consistent comma-dangle lint rule
...
Make changes so that tests will pass when the comma-dangle settings
applied to the rest of the code base are also applied to tests.
PR-URL: https://github.com/nodejs/node/pull/37930
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is >
2021-04-01 23:14:29 -07:00
raisinten
1eb228eafd
lib: support BigInt in querystring.stringify
...
Fixes: https://github.com/nodejs/node/issues/36080
PR-URL: https://github.com/nodejs/node/pull/36499
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2020-12-21 15:03:58 +01:00
Daijiro Wachi
3b925219c3
querystring: manage percent character at unescape
...
Related: https://github.com/nodejs/node/issues/33892
Fixes: https://github.com/nodejs/node/issues/35012
PR-URL: https://github.com/nodejs/node/pull/35013
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
2020-09-03 20:43:39 -07:00
sapics
d4a1c98a54
querystring: fix stringify for empty array
...
PR-URL: https://github.com/nodejs/node/pull/33918
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2020-06-24 16:18:00 -07:00
Ruben Bridgewater
e038d6a1cd
test: refactor common.expectsError
...
This completely refactors the `expectsError` behavior: so far it's
almost identical to `assert.throws(fn, object)` in case it was used
with a function as first argument. It had a magical property check
that allowed to verify a functions `type` in case `type` was passed
used in the validation object. This pattern is now completely removed
and `assert.throws()` should be used instead.
The main intent for `common.expectsError()` is to verify error cases
for callback based APIs. This is now more flexible by accepting all
validation possibilites that `assert.throws()` accepts as well. No
magical properties exist anymore. This reduces surprising behavior
for developers who are not used to the Node.js core code base.
This has the side effect that `common` is used significantly less
frequent.
PR-URL: https://github.com/nodejs/node/pull/31092
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
2019-12-31 15:54:20 +01:00
Ruben Bridgewater
b08a867d60
benchmark,doc,lib: capitalize more comments
...
PR-URL: https://github.com/nodejs/node/pull/26849
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
2019-03-27 17:20:06 +01:00
Ruben Bridgewater
f8763bb077
benchmark,doc,lib,test: capitalize comments
...
PR-URL: https://github.com/nodejs/node/pull/26483
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2019-03-10 00:44:40 +01:00
Ruben Bridgewater
9edce1e12a
benchmark,doc,lib,test: capitalize comments
...
This updates a lot of comments.
PR-URL: https://github.com/nodejs/node/pull/26223
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com >
2019-02-28 18:31:10 +01:00
Ruben Bridgewater
50dd555910
doc,lib,test: capitalize comment sentences
...
This activates the eslint capitalize comment rule for comments
above 50 characters.
PR-URL: https://github.com/nodejs/node/pull/24996
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-12-17 17:14:35 +01:00
seantcoyote
f87e96665e
test: fix assertion arguments order
...
There's no issue for this PR, it's a task at the Node+JS Code-n-Learn.
PR-URL: https://github.com/nodejs/node/pull/23584
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
2018-10-15 15:33:11 +02:00
Rich Trott
3c31bfff65
benchmark,lib,test,tools: use consistent quotes
...
In preparation for a linting rule, use consistent quotation for
properties in objects.
PR-URL: https://github.com/nodejs/node/pull/19156
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-03-07 19:06:44 -08:00
Gus Caplan
6934792eb3
lint: move eslint to new plugin system
...
PR-URL: https://github.com/nodejs/node/pull/18566
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
2018-02-20 13:13:22 -06:00
Ruben Bridgewater
644fdd60d4
test: minor refactoring
...
Add punctuation and comments about code that should not throw.
Also remove a obsolete test and refactor some tests.
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-16 16:54:07 +01:00
Ruben Bridgewater
caee112e52
test: remove assert.doesNotThrow()
...
There is actually no reason to use `assert.doesNotThrow()` in the
tests. If a test throws, just let the error bubble up right away
instead of first catching it and then rethrowing it.
PR-URL: https://github.com/nodejs/node/pull/18669
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-02-16 16:53:47 +01:00
Leko
3c62f33d7b
test: replace function with arrow function
...
1. Among the list of Code and Learn,
I solved the unfinished task of replacing function with arrow function:
https://github.com/nodejs/code-and-learn/issues/72#issuecomment-345667395
2. Replace arrow function with shorter property syntax
Arrow function makes `this` lexical scope.
But toString expects evaluate `this` in runtime.
3. Replace this with null
makeBlock does not need `this`.
update `this` with `null` to clarify the intent.
PR-URL: https://github.com/nodejs/node/pull/17345
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
Reviewed-By: Yosuke Furukawa <yosuke.furukawa@gmail.com >
2017-11-29 16:10:08 +02:00
Rami Moshe
9788e96836
querystring: convert to using internal/errors
...
PR-URL: https://github.com/nodejs/node/pull/15565
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2017-10-28 14:04:53 -04:00
Rich Trott
aa6fac68da
test: adjust indentation for stricter linting
...
ESLint 4.x has stricter linting than previous versions. We are currently
using the legacy indentation rules in the test directory. This commit
changes the indentation of files to comply with the stricter 4.x linting
and enable stricter linting in the test directory.
PR-URL: https://github.com/nodejs/node/pull/14431
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trevor Norris <trev.norris@gmail.com >
2017-07-27 09:24:20 -07:00
Sebastiaan Deckers
bb29405904
lib,src: fix consistent spacing inside braces
...
PR-URL: https://github.com/nodejs/node/pull/14162
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-07-21 15:13:47 -04:00
Timothy Gu
afab5aba32
querystring: fix up lastPos usage
...
Use lastPos ONLY for tracking what has been .slice()'d, never as an
indication of if key/value has been seen, since lastPos is updated on
seeing + as well.
PR-URL: https://github.com/nodejs/node/pull/14151
Fixes: https://github.com/nodejs/node/issues/13773
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Brian White <mscdex@mscdex.net >
2017-07-12 12:12:48 +08:00
Łukasz Szewczak
42958d1a75
test: refactor test-querystring
...
- change URIError constructor to regular expression in assert.throws
- use block-scope for tests that spans multiple statements
PR-URL: https://github.com/nodejs/node/pull/12661
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: David Cai <davidcai1993@yahoo.com >
2017-05-08 00:03:43 +02:00
Rich Trott
a180259e42
test,lib,doc: use function declarations
...
Replace function expressions with function declarations in preparation
for a lint rule requiring function declarations.
PR-URL: https://github.com/nodejs/node/pull/12711
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
2017-05-01 15:56:58 -07:00
DavidCai
dc7d9eb0a9
test: increase querystring coverage
...
PR-URL: https://github.com/nodejs/node/pull/12163
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-04-04 09:28:36 -07:00
Brian White
61ebfa8d1f
tools: add unescaped regexp dot rule to linter
...
PR-URL: https://github.com/nodejs/node/pull/11834
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com >
2017-03-29 10:53:28 +02:00
James M Snell
98e54b0bd4
meta: restore original copyright header
...
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-03-10 11:23:48 -08:00
Daijiro Wachi
acc3a80546
test: add two test cases for querystring
...
+ Cover untested branch in the state machine with the string
that its first letter is `+` in the key/value.
+ `qs.unescapeBuffer` shouldn't decode `+` to space.
PR-URL: https://github.com/nodejs/node/pull/11551
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2017-03-01 18:06:56 +01:00
Daijiro Wachi
dd2e135560
test: add two test cases for querystring
...
+ Check an empty substring: In `querystring`, if the `maxKeys` is 1
and the state machine finds an empty substring between separators,
it should return an empty object.
+ Test invalid encoded strings: If provided string is an invalid
encoded string in `query.parse`, it will not be encoded.
PR-URL: https://github.com/nodejs/node/pull/11481
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-02-23 17:08:41 -08:00
Daijiro Wachi
02acea92d2
test: add cases for unescape & unescapeBuffer
...
These two functions in the querystring are used as a fallback.
To test them, two test cases were added which make errors that
will be caught.
PR-URL: https://github.com/nodejs/node/pull/11326
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2017-02-19 12:39:20 -08:00
Daijiro Wachi
eec216fb27
test: cases to querystring related to empty string
...
+ Add cases to `qs.stringify` that return empty string
+ Add cases to `qs.parse` when `sep` or `eq` is empty
PR-URL: https://github.com/nodejs/node/pull/11329
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2017-02-16 14:49:59 -08:00
Brian White
8bcc122349
test: improve querystring.parse assertion messages
...
PR-URL: https://github.com/nodejs/node/pull/11234
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com >
2017-02-13 10:40:45 -08:00
Brian White
ff785fd517
querystring: fix empty pairs and optimize parse()
...
This commit fixes handling of empty pairs that occur before the end
of the query string so that they are also ignored.
Additionally, some optimizations have been made, including:
* Avoid unnecessary code execution where possible
* Use a lookup table when checking for hex characters
* Avoid forced decoding when '+' characters are encountered and we
are using the default decoder
Fixes: https://github.com/nodejs/node/issues/10454
PR-URL: https://github.com/nodejs/node/pull/11234
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Nicu Micleușanu <micnic90@gmail.com >
2017-02-13 10:40:37 -08:00
Daijiro Wachi
4e259b21a3
querystring, url: handle repeated sep in search
...
* update state machine in parse
* repeated sep should be adjusted
* `&=&=` should be `{ '': [ '', '' ] }`
* add test cases for querystring and URLSearchParams
Fixes: https://github.com/nodejs/node/issues/10454
PR-URL: https://github.com/nodejs/node/pull/10967
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Timothy Gu <timothygu99@gmail.com >
2017-02-02 13:02:44 -08:00
Brian White
3bdcbdb1a0
querystring: improve unescapeBuffer performance
...
PR-URL: https://github.com/nodejs/node/pull/10837
Reviewed-By: James M Snell <jasnell@gmail.com >
2017-01-25 02:22:26 -05:00
Brian White
05f38be556
querystring: improve stringify() performance
...
PR-URL: https://github.com/nodejs/node/pull/10852
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com >
2017-01-25 02:15:03 -05:00
Gibson Fahnestock
3d2aef3979
test: s/assert.equal/assert.strictEqual/
...
Use assert.strictEqual instead of assert.equal in tests, manually
convert types where necessary.
PR-URL: https://github.com/nodejs/node/pull/10698
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
2017-01-11 14:19:26 +00:00
Gibson Fahnestock
7a0e462f9f
test: use eslint to fix var->const/let
...
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 >
2017-01-11 11:43:52 +00:00
Rich Trott
a68987c154
benchmark,lib,test: adjust for linting
...
Formatting changes for upcoming linter update.
PR-URL: https://github.com/nodejs/node/pull/10561
Reviewed-By: Teddy Katz <teddy.katz@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Sam Roberts <vieuxtech@gmail.com >
2017-01-06 14:36:01 -08:00
cjihrig
ff1efa6087
test: use const for all require() calls
...
PR-URL: https://github.com/nodejs/node/pull/10550
Reviewed-By: Rich Trott <rtrott@gmail.com >
2017-01-02 18:28:18 -05:00
cjihrig
4a408321d9
test: cleanup IIFE tests
...
A number of test files use IIFEs to separate distinct tests from
each other in the same file. The project has been moving toward
using block scopes and let/const in favor of IIFEs. This commit
moves IIFE tests to block scopes. Some additional cleanup such
as use of strictEqual() and common.mustCall() is also included.
PR-URL: https://github.com/nodejs/node/pull/7694
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com >
2016-07-14 22:07:14 -04:00
Rich Trott
a7335bd1f0
test,benchmark: use deepStrictEqual()
...
In preparation for a lint rule that will enforce
assert.deepStrictEqual() over assert.deepEqual(), change tests and
benchmarks accordingly. For tests and benchmarks that are testing or
benchmarking assert.deepEqual() itself, apply a comment to ignore the
upcoming rule.
PR-URL: https://github.com/nodejs/node/pull/6213
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2016-04-22 14:38:09 -07:00
Brian White
dba245f796
querystring: don't inherit from Object.prototype
...
This commit safely allows querystring keys that are named the same as
properties that are ordinarily inherited from Object.prototype such
as __proto__. Additionally, this commit provides a bit of a speed
improvement (~25% in the querystring-parse 'manypairs' benchmark)
when there are many unique keys.
Fixes: https://github.com/nodejs/node/issues/5642
PR-URL: https://github.com/nodejs/node/pull/6055
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-04-18 21:40:03 -04:00
Brian White
c169ac6bab
querystring: don't stringify bad surrogate pair
...
Fixes: https://github.com/nodejs/node/issues/3702
PR-URL: https://github.com/nodejs/node/pull/5858
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-03-26 04:17:12 -04:00
Brian White
a2a69a2b63
querystring: improve parse() performance
...
This commit improves parse() performance by ~20-200% with the various
querystring-parse benchmarks.
Some optimization strategies used in this commit include:
* Combining multiple searches (for '&', '=', and '+') on the same
string into a single loop
* Avoiding string.split()
* Minimizing creation of temporary strings
* Avoiding string decoding if no encoded bytes were found and the
default string decoder is being used
PR-URL: https://github.com/nodejs/node/pull/5012
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Roman Reiss <me@silverwind.io >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2016-02-12 19:59:49 -05:00
Rich Trott
8d61787f17
test: fix variable redeclarations
...
I'm a fan of small changesets, but even I'm getting a little annoyed at
me for opening all these PRs weeding out variable redeclarations. So I'm
bundling a bunch of small changes here.
PR-URL: https://github.com/nodejs/node/pull/4992
Reviewed-By: Michaël Zasso <mic.besace@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2016-02-02 12:48:08 -08:00
Michaël Zasso
d1aabd6264
test: fix style issues after eslint update
...
Replace var keyword with const or let.
PR-URL: https://github.com/nodejs/io.js/pull/2286
Reviewed-By: Roman Reiss <me@silverwind.io >
2016-01-13 23:16:17 +01:00
Rich Trott
082cc8d6d8
test: remove unnecessary assignments
...
common.js needs to be loaded in all tests so that there is checking
for variable leaks and possibly other things. However, it does not
need to be assigned to a variable if nothing in common.js is referred
to elsewhere in the test.
PR-URL: https://github.com/nodejs/node/pull/4408
Reviewed-By: James M Snell <jasnell@gmail.com >
2015-12-26 18:00:02 -08:00
Roman Reiss
f29762f4dd
test: enable linting for tests
...
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-05-19 21:21:27 +02:00
Jeremiah Senkpiel
a89f5c2156
querystring: parse numbers correctly
...
Fixes a number parsing regression introduced in 85a92a3
Fixes: https://github.com/iojs/io.js/issues/1208
PR-URL: https://github.com/iojs/io.js/pull/1213
Reviewed-By: Rod Vagg <rod@vagg.org >
Reviewed-By: Brian White <mscdex@mscdex.net >
2015-03-19 21:45:38 -04:00