Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function isolatedContainer(fullNames) {
var container = new Ember.Container();
container.optionsForType('component', { singleton: false });
container.optionsForType('view', { singleton: false });
container.optionsForType('template', { instantiate: false });
container.optionsForType('helper', { instantiate: false });
for (var i = fullNames.length; i > 0; i--) {
var fullName = fullNames[i - 1];
container.register(fullName, resolver.resolve(fullName));
}
return container;
}
moduleFor('component:' + name, description, callbacks, function(container, context) {
var templateName = 'template:components/' + name;
var template = resolver.resolve(templateName);
if (template) {
container.register(templateName, template);
container.injection('component:' + name, 'template', templateName);
}
context.__setup_properties__.$ = function(selector) {
var view = Ember.run(function(){
return context.subject().appendTo(Ember.$('#ember-testing')[0]);
});
return view.$();
};
});
}