visionmedia/should.js — Issue #33: includeEql throws "Object has no method 'some'"
Author: theycallmeswift
Created: 2012-01-03 23:12:34+00:00
State: open

Looks like somebody had underscore installed when they wrote this method and forgot to test in isolation. No method `some` exists so this throws an error:

`['blah', 'foo', 'bar'].should.includeEql('bar') // throws!`

This is the culprit:

includeEql: function(obj){
this.assert(
this.obj.some(function(item) { return eql(obj, item); })
, 'expected ' + this.inspect + ' to include an object equal to ' + i(obj)
, 'expected ' + this.inspect + ' to not include an object equal to ' + i(obj));
return this;
},