Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, it, beforeEach, afterEach } from 'mocha';
import { run } from '@ember/runloop';
import Application from '@ember/application';
import { initialize } from '<%= dasherizedModulePrefix %>/initializers/<%= dasherizedModuleName %>';
import destroyApp from '../../helpers/destroy-app';
<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } %>

describe('<%= friendlyTestName %>', function() {
let application;
Expand All @@ -16,7 +16,7 @@ describe('<%= friendlyTestName %>', function() {
});

afterEach(function() {
destroyApp(application);
<% if (destroyAppExists) { %>destroyApp(application);<% } else { %>run(application, 'destroy');<% } %>
});

// Replace this with your real tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { run } from '@ember/runloop';

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run is already imported above

<% if (destroyAppExists) { %>import destroyApp from '../../helpers/destroy-app';<% } %>

module('<%= friendlyTestName %>', {
beforeEach() {
Expand Down
4 changes: 2 additions & 2 deletions node-tests/fixtures/acceptance-test/mocha.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { describe, it, beforeEach, afterEach } from 'mocha';
import { expect } from 'chai';
import startApp from 'my-app/tests/helpers/start-app';
import destroyApp from 'my-app/tests/helpers/destroy-app';
import { run } from '@ember/runloop';

describe('Acceptance | foo', function() {
let application;
Expand All @@ -11,7 +11,7 @@ describe('Acceptance | foo', function() {
});

afterEach(function() {
destroyApp(application);
run(application, 'destroy');
});

it('can visit /foo', function() {
Expand Down
4 changes: 2 additions & 2 deletions node-tests/fixtures/initializer-test/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { run } from '@ember/runloop';

import { initialize } from 'my-app/initializers/foo';
import { module, test } from 'qunit';
import destroyApp from '../../helpers/destroy-app';


module('Unit | Initializer | foo', {
beforeEach() {
Expand All @@ -13,7 +13,7 @@ module('Unit | Initializer | foo', {
});
},
afterEach() {
destroyApp(this.application);
run(this.application, 'destroy');
}
});

Expand Down
4 changes: 2 additions & 2 deletions node-tests/fixtures/initializer-test/dummy.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { run } from '@ember/runloop';

import { initialize } from 'dummy/initializers/foo';
import { module, test } from 'qunit';
import destroyApp from '../../helpers/destroy-app';


module('Unit | Initializer | foo', {
beforeEach() {
Expand All @@ -13,7 +13,7 @@ module('Unit | Initializer | foo', {
});
},
afterEach() {
destroyApp(this.application);
run(this.application, 'destroy');
}
});

Expand Down
4 changes: 2 additions & 2 deletions node-tests/fixtures/initializer-test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, it, beforeEach, afterEach } from 'mocha';
import { run } from '@ember/runloop';
import Application from '@ember/application';
import { initialize } from 'my-app/initializers/foo';
import destroyApp from '../../helpers/destroy-app';


describe('Unit | Initializer | foo', function() {
let application;
Expand All @@ -16,7 +16,7 @@ describe('Unit | Initializer | foo', function() {
});

afterEach(function() {
destroyApp(application);
run(application, 'destroy');
});

// Replace this with your real tests.
Expand Down
4 changes: 2 additions & 2 deletions node-tests/fixtures/initializer-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Application from '@ember/application';
import { initialize } from 'my-app/initializers/foo';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import destroyApp from '../../helpers/destroy-app';
import { run } from '@ember/runloop';

module('Unit | Initializer | foo', function(hooks) {
setupTest(hooks);
Expand All @@ -19,7 +19,7 @@ module('Unit | Initializer | foo', function(hooks) {
});

hooks.afterEach(function() {
destroyApp(this.application);
run(this.application, 'destroy');
});

// Replace this with your real tests.
Expand Down
3 changes: 1 addition & 2 deletions node-tests/fixtures/instance-initializer-test/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Application from '@ember/application';
import { run } from '@ember/runloop';
import { initialize } from 'my-app/instance-initializers/foo';
import { module, test } from 'qunit';
import destroyApp from '../../helpers/destroy-app';

module('Unit | Instance Initializer | foo', {
beforeEach() {
Expand All @@ -13,7 +12,7 @@ module('Unit | Instance Initializer | foo', {
},
afterEach() {
run(this.appInstance, 'destroy');
destroyApp(this.application);
run(this.application, 'destroy');
}
});

Expand Down
3 changes: 1 addition & 2 deletions node-tests/fixtures/instance-initializer-test/dummy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Application from '@ember/application';
import { run } from '@ember/runloop';
import { initialize } from 'dummy/instance-initializers/foo';
import { module, test } from 'qunit';
import destroyApp from '../../helpers/destroy-app';

module('Unit | Instance Initializer | foo', {
beforeEach() {
Expand All @@ -13,7 +12,7 @@ module('Unit | Instance Initializer | foo', {
},
afterEach() {
run(this.appInstance, 'destroy');
destroyApp(this.application);
run(this.application, 'destroy');
}
});

Expand Down
6 changes: 3 additions & 3 deletions node-tests/fixtures/instance-initializer-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Application from '@ember/application';
import { initialize } from 'my-app/instance-initializers/foo';
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import destroyApp from '../../helpers/destroy-app';
import { run } from '@ember/runloop';

module('Unit | Instance Initializer | foo', function(hooks) {
setupTest(hooks);
Expand All @@ -18,8 +18,8 @@ module('Unit | Instance Initializer | foo', function(hooks) {
this.instance = this.application.buildInstance();
});
hooks.afterEach(function() {
destroyApp(this.application);
destroyApp(this.instance);
run(this.application, 'destroy');
run(this.instance, 'destroy');
});

// Replace this with your real tests.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"broccoli-uglify-sourcemap": "^2.0.2",
"common-tags": "^1.7.2",
"dag-map": "^2.0.2",
"ember-cli": "github:ember-cli/ember-cli#76175513c5e49caf5405b7304e83ddf3e799c68e",
"ember-cli": "github:ember-cli/ember-cli#8f5a13a02d8ea5a04683565340611161c63bef89",
"ember-cli-blueprint-test-helpers": "^0.18.3",
"ember-cli-browserstack": "^0.0.6",
"ember-cli-dependency-checker": "^2.1.0",
Expand Down
Loading