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:
Steve Gravrock
2019-08-26 15:45:13 -07:00
parent 0449b35f5a
commit 1a63ab4677
3 changed files with 17 additions and 2 deletions

View File

@@ -28,6 +28,10 @@ describe('Env', function() {
});
});
it('accepts its own current configureation', function() {
env.configure(env.configuration());
});
it('can configure specs to throw errors on expectation failures', function() {
env.configure({ oneFailurePerSpec: true });
@@ -53,6 +57,11 @@ describe('Env', function() {
});
describe('promise library', function() {
it('can be configured without a custom library', function() {
env.configure({});
env.configure({ Promise: undefined });
});
it('can be configured with a custom library', function() {
var myLibrary = {
resolve: jasmine.createSpy(),