Code:
var cartModule = (function() {
checkOverbook: function(skip) {
return new Promise(function(resolve, reject) {
if (skip) {
addItemPromiseResolver = resolve;
} else {
resolve({"continue_add":true})
}
})
},
})();
I'd like to test that when cartModule.checkOverbook is called with skip = true, that the promise is resolved, but that when it's called with skip = false it is not resolved. Is this possible/recommended, or should I just test this in the context of the consuming function?