Skip to content

Commit

Permalink
Merge pull request #19087 from mehulkar/mk/19046
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue authored Aug 7, 2020
2 parents e463258 + fa35230 commit 4b1ffe2
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import Application from '@ember/application';

import { initialize } from '<%= modulePrefix %>/initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>

module('<%= friendlyTestName %>', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = Application.extend();
this.TestApplication = class TestApplication extends Application {}
this.TestApplication.initializer({
name: 'initializer under test',
initialize
});

this.application = this.TestApplication.create({ autoboot: false });
this.application = this.TestApplication.create({ autoboot: false, Resolver });
});

hooks.afterEach(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import Application from '@ember/application';

import { initialize } from '<%= modulePrefix %>/instance-initializers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } else { %>import { run } from '@ember/runloop';<% } %>

module('<%= friendlyTestName %>', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = Application.extend();
this.TestApplication = class TestApplication extends Application {}
this.TestApplication.instanceInitializer({
name: 'initializer under test',
initialize
});
this.application = this.TestApplication.create({ autoboot: false });
this.application = this.TestApplication.create({ autoboot: false, Resolver });
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import Application from '@ember/application';

import { initialize } from 'my-app/init/initializers/foo';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
import { run } from '@ember/runloop';

module('Unit | Initializer | foo', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = Application.extend();
this.TestApplication = class TestApplication extends Application {}
this.TestApplication.initializer({
name: 'initializer under test',
initialize
});

this.application = this.TestApplication.create({ autoboot: false });
this.application = this.TestApplication.create({ autoboot: false, Resolver });
});

hooks.afterEach(function() {
Expand Down
5 changes: 3 additions & 2 deletions node-tests/fixtures/initializer-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@ import Application from '@ember/application';

import { initialize } from 'my-app/initializers/foo';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
import { run } from '@ember/runloop';

module('Unit | Initializer | foo', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = Application.extend();
this.TestApplication = class TestApplication extends Application {}
this.TestApplication.initializer({
name: 'initializer under test',
initialize
});

this.application = this.TestApplication.create({ autoboot: false });
this.application = this.TestApplication.create({ autoboot: false, Resolver });
});

hooks.afterEach(function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import Application from '@ember/application';

import { initialize } from 'my-app/init/instance-initializers/foo';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
import { run } from '@ember/runloop';

module('Unit | Instance Initializer | foo', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = Application.extend();
this.TestApplication = class TestApplication extends Application {}
this.TestApplication.instanceInitializer({
name: 'initializer under test',
initialize
});
this.application = this.TestApplication.create({ autoboot: false });
this.application = this.TestApplication.create({ autoboot: false, Resolver });
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
Expand Down
5 changes: 3 additions & 2 deletions node-tests/fixtures/instance-initializer-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ import Application from '@ember/application';

import { initialize } from 'my-app/instance-initializers/foo';
import { module, test } from 'qunit';
import Resolver from 'ember-resolver';
import { run } from '@ember/runloop';

module('Unit | Instance Initializer | foo', function(hooks) {
hooks.beforeEach(function() {
this.TestApplication = Application.extend();
this.TestApplication = class TestApplication extends Application {}
this.TestApplication.instanceInitializer({
name: 'initializer under test',
initialize
});
this.application = this.TestApplication.create({ autoboot: false });
this.application = this.TestApplication.create({ autoboot: false, Resolver });
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
Expand Down

0 comments on commit 4b1ffe2

Please sign in to comment.