How to use the ember-test-helpers/test-resolver.getResolver function in ember-test-helpers

To help you get started, we’ve selected a few ember-test-helpers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github adopted-ember-addons / ember-collection / tests / helpers / module-for-view.js View on Github external
setupView: function() {
    var _this = this;
    var resolver = getResolver();
    var container = this.container;
    var context = this.context;
    var templateName = 'template:' + this.viewName;
    var template = resolver.resolve(templateName);
    if (template) {
      container.register(templateName, template);
      container.injection(this.subjectName, 'template', templateName);
    }
    context.dispatcher = Ember.EventDispatcher.create();
    context.dispatcher.setup({}, '#ember-testing');
    this.callbacks.render = function(options) {
      var containerView = Ember.ContainerView.create(merge({container: container}, options));
      var view = run(function(){
        var subject = context.subject();
        containerView.pushObject(subject);
        containerView.appendTo('#ember-testing');
github ember-animation / ember-animated / tests / helpers / module-for-integration.js View on Github external
setupContainer: function() {
    var resolver = getResolver();
    var namespace = Ember.Object.create({
      Resolver: { create: function() { return resolver; } }
    });

    if (Ember.Application.buildRegistry) {
      var registry;
      registry = Ember.Application.buildRegistry(namespace);
      registry.register('component-lookup:main', Ember.ComponentLookup);
      this.registry = registry;
      this.container = registry.container();
    } else {
      this.container = Ember.Application.buildContainer(namespace);
      this.container.register('component-lookup:main', Ember.ComponentLookup);
    }
  },