Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { deprecate } from '@ember/application/deprecations';
import { tryInvoke } from '@ember/utils';
import { run } from '@ember/runloop';
import { merge } from '@ember/polyfills';
import Ember from 'ember';
import TestModule from 'ember-test-helpers/test-module';
import { getResolver } from 'ember-test-helpers/test-resolver';
import { createModule } from 'ember-qunit/qunit-module';
var TestModuleForView = TestModule.extend({
init: function(viewName, description, callbacks) {
this.viewName = viewName;
this._super.call(this, 'component:' + viewName, description, callbacks);
this.setupSteps.push(this.setupView);
},
initNeeds: function() {
this.needs = [];
// toplevel refers to class extended from Ember.View
if (this.subjectName !== 'component:toplevel') {
this.needs.push(this.subjectName);
}
if (this.callbacks.needs) {
this.needs = this.needs.concat(this.callbacks.needs);
delete this.callbacks.needs;
}
},