ember-test-helpers
Advanced tools
Comparing version 0.5.20 to 0.5.21
@@ -1,2 +0,2 @@ | ||
/* global DS */ // added here to prevent an import from erroring when ED is not present | ||
/* global DS, require, requirejs */ // added here to prevent an import from erroring when ED is not present | ||
@@ -23,4 +23,14 @@ import TestModule from './test-module'; | ||
if (!adapterFactory) { | ||
adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter; | ||
if (requirejs.entries['ember-data/adapters/json-api']) { | ||
adapterFactory = require('ember-data/adapters/json-api')['default']; | ||
} | ||
// when ember-data/adapters/json-api is provided via ember-cli shims | ||
// using Ember Data 1.x the actual JSONAPIAdapter isn't found, but the | ||
// above require statement returns a bizzaro object with only a `default` | ||
// property (circular reference actually) | ||
if (!adapterFactory || !adapterFactory.create) { | ||
adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter; | ||
} | ||
var thingToRegisterWith = this.registry || this.container; | ||
@@ -27,0 +37,0 @@ thingToRegisterWith.register('adapter:application', adapterFactory); |
@@ -34,2 +34,3 @@ /* globals jQuery, self */ | ||
var waitForAJAX = options.hasOwnProperty('waitForAJAX') ? options.waitForAJAX : true; | ||
var waitForWaiters = options.hasOwnProperty('waitForWaiters') ? options.waitForWaiters : true; | ||
@@ -46,2 +47,8 @@ return new Ember.RSVP.Promise(function(resolve) { | ||
if (waitForWaiters && Ember.Test.waiters && Ember.Test.waiters.any(([context, callback]) => { | ||
return !callback.call(context); | ||
})) { | ||
return; | ||
} | ||
// Stop polling | ||
@@ -48,0 +55,0 @@ self.clearInterval(watcher); |
{ | ||
"name": "ember-test-helpers", | ||
"version": "0.5.20", | ||
"version": "0.5.21", | ||
"description": "Helpers for testing Ember.js applications", | ||
@@ -5,0 +5,0 @@ "main": "lib/ember-test-helpers.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45485
782