Browse Source

querystring.js: JSLint warnings fixed

v0.7.4-release
Jan Kassens 15 years ago
committed by Ryan Dahl
parent
commit
f18d9d8466
  1. 19
      test/simple/test-querystring.js

19
test/simple/test-querystring.js

@ -1,5 +1,5 @@
common = require("../common"); common = require("../common");
assert = common.assert assert = common.assert;
// test using assert // test using assert
@ -107,15 +107,18 @@ qsNoMungeTestCases.forEach(function (testCase) {
}); });
// test the nested qs-in-qs case // test the nested qs-in-qs case
var f = qs.parse("a=b&q=x%3Dy%26y%3Dz"); (function(){
f.q = qs.parse(f.q); var f = qs.parse("a=b&q=x%3Dy%26y%3Dz");
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } }); f.q = qs.parse(f.q);
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } });
})();
// nested in colon // nested in colon
var f = qs.parse("a:b;q:x%3Ay%3By%3Az", ";", ":"); (function(){
f.q = qs.parse(f.q, ";", ":"); var f = qs.parse("a:b;q:x%3Ay%3By%3Az", ";", ":");
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } }); f.q = qs.parse(f.q, ";", ":");
assert.deepEqual(f, { a : "b", q : { x : "y", y : "z" } });
})();
// now test stringifying // now test stringifying
assert.throws(function () { assert.throws(function () {

Loading…
Cancel
Save