Take 2
This commit is contained in:
parent
9d3ce5fa6d
commit
e58e9186f8
2 changed files with 10 additions and 8 deletions
|
|
@ -105,8 +105,11 @@ o.spec("parseQueryString", function() {
|
|||
})
|
||||
o("doesn't pollute prototype indirectly, retains `constructor`", function() {
|
||||
var prev = Object.prototype.toString
|
||||
var data = parseQueryString("constructor%5Bprototype%5D%5BtoString%5D=123")
|
||||
var data = parseQueryString("a=b&constructor%5Bprototype%5D%5BtoString%5D=123")
|
||||
o(Object.prototype.toString).equals(prev)
|
||||
o(data).deepEquals({a: "b"})
|
||||
// The deep matcher is borked here.
|
||||
o(Object.keys(data)).deepEquals(["a", "constructor"])
|
||||
o(data.a).equals("b")
|
||||
o(data.constructor).deepEquals({prototype: {toString: "123"}})
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue