Skip to content

Implement a destroyApp helper. - #4772

Merged
stefanpenner merged 1 commit into
ember-cli:masterfrom
blimmer:destroy-app-helper
Sep 9, 2015
Merged

stefanpenner merged 1 commit into
ember-cli:masterfrom
blimmer:destroy-app-helper

Conversation

@blimmer

@blimmer blimmer commented Aug 30, 2015

Copy link
Copy Markdown
Contributor

This is similar to startApp, and is very simple for the time being. However, this allows addon authors to hook into when the app is destroyed in a testing environment.

@blimmer

blimmer commented Aug 30, 2015

Copy link
Copy Markdown
Contributor Author

Specifically, this came up with ember-cli-mirage. We need to shutdown the pretender server via server.shutdown() after each acceptance test (described here). However, because of differences in testing frameworks, there's not a clean place for us to implement this behavior.

With this change, we'd be able to edit the destroy-app.js file on ember install of the addon to shutdown the server.

@blimmer

blimmer commented Aug 30, 2015

Copy link
Copy Markdown
Contributor Author

If this gets accepted, I'll go ahead and update ember-cli-mocha to utilize it, too.

@blimmer
blimmer force-pushed the destroy-app-helper branch from 7098363 to 575b44c Compare August 30, 2015 02:07
This is similar to startApp, and is very simple for the time being. However, this allows addon authors to hook into when the app is destroyed in a testing environment.
@blimmer
blimmer force-pushed the destroy-app-helper branch from 575b44c to 83b9aba Compare August 30, 2015 15:47
@trabus

trabus commented Sep 8, 2015

Copy link
Copy Markdown
Contributor

LGTM 👍

stefanpenner added a commit that referenced this pull request Sep 9, 2015
@stefanpenner
stefanpenner merged commit 5e5d767 into ember-cli:master Sep 9, 2015
@cibernox

cibernox commented Sep 9, 2015

Copy link
Copy Markdown
Contributor

Simple and clever 👍

@blimmer

blimmer commented Sep 21, 2015

Copy link
Copy Markdown
Contributor Author

I have an open PR on ember-watson to assist folks in migrating their old acceptance tests to use the new helper.

@stefanpenner

Copy link
Copy Markdown
Contributor

@blimmer 👍

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.

4 participants