Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("should return promise, resolved with given value if it is not a string, array or an object", function(done) {
RSVP
.all((list = [null, chance.natural(), chance.floating(), undefined, new Error]).map(function(value, index) {
return dm.parse(value);
}))
.then(function(results) {
results.forEach(function(result, index) {
var call;
expect(call = async.resolve.getCall(index)).to.exist();
expect(call.calledWithExactly(list[index])).to.be.true();
expect(result).equal(list[index]);
});
})
.then(done)
.catch(done);
});