@@ -43,7 +43,7 @@ var setIsSubsetHelper = function setIsSubsetHelper(lhs, rhs){
// do not short-circuit when lhs.size() > rhs.size()
// because lhs can have redundant entries
for (var i = 0; i < lhs.length; i++){
- if (rkeys.indexOf(JSON.stringify(lhs[i])) < 0) {
+ if (rkeys.indexOf(JSON.stringify(lhs[i])) < 0) { //TODO Why do we stringify the lhs and not the rhs?
return false
}
@@ -122,6 +122,10 @@ module.exports = {
"should ignore dups in the source": function(){
this.compare([1,2,1], [1,2], true);
+ },
+
+ "should know the difference between a number and a string": function(){
+ this.compare([1], ["1"], true);