diff --git a/lib/utils.js b/lib/utils.js index aef5fa1192..7ad5bf70e0 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -181,7 +181,7 @@ function isStandardBrowserEnv() { return ( typeof window !== 'undefined' && typeof document !== 'undefined' && - typeof document.createElement === 'function' + typeof document.createElement !== 'undefined' ); } diff --git a/test/specs/requests.spec.js b/test/specs/requests.spec.js index f8cd032732..49a97a3602 100644 --- a/test/specs/requests.spec.js +++ b/test/specs/requests.spec.js @@ -51,6 +51,7 @@ describe('requests', function () { expect(reason.config.method).toBe('get'); expect(reason.config.url).toBe('http://thisisnotaserver'); + jasmine.Ajax.install(); done(); };