Created
August 5, 2010 17:41
-
-
Save cloudhead/510079 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5adc9addcea62a86562696b783859e116e604b18 Mon Sep 17 00:00:00 2001 | |
From: cloudhead <[email protected]> | |
Date: Thu, 5 Aug 2010 13:43:10 -0400 | |
Subject: [PATCH] test querystring.parse with undefined value | |
--- | |
test/simple/test-querystring.js | 7 +++++++ | |
1 files changed, 7 insertions(+), 0 deletions(-) | |
diff --git a/test/simple/test-querystring.js b/test/simple/test-querystring.js | |
index e159846..aa889ef 100644 | |
--- a/test/simple/test-querystring.js | |
+++ b/test/simple/test-querystring.js | |
@@ -122,6 +122,13 @@ qsNoMungeTestCases.forEach(function (testCase) { | |
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } }); | |
})(); | |
+// undefined | |
+(function(){ | |
+ var f = qs.parse(); | |
+ assert.ok(f); | |
+ assert.equal(Object.keys(f).length, 0); | |
+})(); | |
+ | |
// now test stringifying | |
assert.throws(function () { | |
var f = {}; | |
-- | |
1.7.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment