Skip to content

Commit

Permalink
Add test coverage for Array native method bleed-though
Browse files Browse the repository at this point in the history
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
  • Loading branch information
cscade authored and tj committed Jul 22, 2011
1 parent 44e8b4d commit 79542c2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parse.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ module.exports = {
'test arrays becoming objects': function(){
qs.parse('foo[0]=bar&foo[bad]=baz').should.eql({ foo: { 0: "bar", bad: "baz" }});
qs.parse('foo[bad]=baz&foo[0]=bar').should.eql({ foo: { 0: "bar", bad: "baz" }});
},

'test bleed-through of Array native methods': function(){
Array.prototype.testFunction = function () {};
qs.parse('foo=bar').should.eql({ foo: 'bar' });
}

// 'test complex': function(){
Expand Down

0 comments on commit 79542c2

Please sign in to comment.