Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// addressing the pairing of asyncStart/asyncEnd behavior in a more consistent way.
if (test === currentTest) {
done();
}
},
// clobber default implementation of `exception` will be added back for Ember
// < 2.17 just below...
exception: null,
});
// Ember 2.17 and higher do not require the test adapter to have an `exception`
// method When `exception` is not present, the unhandled rejection is
// automatically re-thrown and will therefore hit QUnit's own global error
// handler (therefore appropriately causing test failure)
if (!hasEmberVersion(2, 17)) {
Adapter = Adapter.extend({
exception(error) {
unhandledRejectionAssertion(QUnit.config.current, error);
},
});
}
export default Adapter;
var resolver = this.resolver;
var items = buildRegistry(
!isolated
? resolver
: Object.create(resolver, {
resolve: {
value() {},
},
})
);
this.container = items.container;
this.registry = items.registry;
if (hasEmberVersion(1, 13)) {
var thingToRegisterWith = this.registry || this.container;
var router = resolver.resolve('router:main');
router = router || EmberRouter.extend();
thingToRegisterWith.register('router:main', router);
}
}
export function setup(value) {
if (arguments.length > 0) {
value = arguments[0];
} else {
value = true;
}
if (!hasEmberVersion(2, 14)) {
Ember.MODEL_FACTORY_INJECTIONS = value;
}
}