diff options
author | Brian White <mscdex@mscdex.net> | 2016-04-19 19:40:28 -0400 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-04-20 08:26:06 -0700 |
commit | e9dc6306ca97598d6a8fe9baa7c8a8ed002287b2 (patch) | |
tree | dbba82ffb139ed9e73825e923d4424e351b4b1b3 /test | |
parent | 4fbd3757244c84c9ac1b8cbeda5d4b531a059a4c (diff) | |
download | android-node-v8-e9dc6306ca97598d6a8fe9baa7c8a8ed002287b2.tar.gz android-node-v8-e9dc6306ca97598d6a8fe9baa7c8a8ed002287b2.tar.bz2 android-node-v8-e9dc6306ca97598d6a8fe9baa7c8a8ed002287b2.zip |
url: use "empty" object for empty query strings
This makes things consistent with the way that the querystring
module creates parsed results.
PR-URL: https://github.com/nodejs/node/pull/6289
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-url.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-url.js b/test/parallel/test-url.js index 760303e98b..1499fb8733 100644 --- a/test/parallel/test-url.js +++ b/test/parallel/test-url.js @@ -927,7 +927,7 @@ var parseTestsWithQueryString = { path: '/example', href: '/example' }, - '/example?query=value':{ + '/example?query=value': { protocol: null, slashes: null, auth: null, @@ -951,6 +951,8 @@ for (const u in parseTestsWithQueryString) { } } + assert.notStrictEqual(Object.getPrototypeOf(actual.query), Object.prototype); + assert.deepEqual(actual, expected); } |