Accept configurations with Promise: undefined.
Fixes Karma and anything else that uses Env#configuration as a starting point for a Jasmine config.
This commit is contained in:
@@ -175,7 +175,10 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
config.hideDisabled = configuration.hideDisabled;
|
||||
}
|
||||
|
||||
if (configuration.hasOwnProperty('Promise')) {
|
||||
// Don't use hasOwnProperty to check for Promise existence because Promise
|
||||
// can be initialized to undefined, either explicitly or by using the
|
||||
// object returned from Env#configuration. In particular, Karma does this.
|
||||
if (configuration.Promise) {
|
||||
if (
|
||||
typeof configuration.Promise.resolve === 'function' &&
|
||||
typeof configuration.Promise.reject === 'function'
|
||||
|
||||
Reference in New Issue
Block a user