Skip to content

[Feature] Update instance-initializer blueprint for ember-mocha 0.14 - #17412

Merged
rwjblue merged 1 commit into
emberjs:masterfrom
simonihmig:instance-init-mocha
Mar 8, 2019
Merged

rwjblue merged 1 commit into
emberjs:masterfrom
simonihmig:instance-init-mocha

Conversation

@simonihmig

Copy link
Copy Markdown
Contributor

Related to #16863

Note: this blueprint and the one for initializers (#17411) follow what the existing QUnit RFC232 blueprints do. However I wondered why for those qunit-based blueprints, the initializer test calls setupTest(), while the instance-initializer does not. For now the two new PRs for ember-mocha 0.14 do the same, but if there is no good reason for this, I can update all of those...

@rwjblue
rwjblue requested a review from Turbo87 December 27, 2018 14:03
});
afterEach(function() {
<% if (destroyAppExists) { %>destroyApp(this.application);<% } else { %>run(this.application, 'destroy');<% } %>
<% if (destroyAppExists) { %>destroyApp(this.instance);<% } else { %>run(this.instance, 'destroy');<% } %>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would assume that the instance needs to be destroyed before the application.

@rwjblue thoughts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, confirm, we should destroy the ApplicationInstance instance before the Application instance. (naming is hard 😭 )

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated this!

Here's a separate PR for QUnit: #17712

@simonihmig
simonihmig force-pushed the instance-init-mocha branch from d072143 to 5b0b146 Compare March 7, 2019 11:54
@rwjblue
rwjblue merged commit 6fbed54 into emberjs:master Mar 8, 2019
@simonihmig
simonihmig deleted the instance-init-mocha branch March 8, 2019 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants