Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@blimmer
Copy link
Contributor

@blimmer blimmer commented Aug 30, 2015

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
Copy link
Contributor Author

blimmer commented Aug 30, 2015

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
Copy link
Contributor Author

blimmer commented Aug 30, 2015

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
Copy link
Contributor

trabus commented Sep 8, 2015

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
Copy link
Contributor

cibernox commented Sep 9, 2015

Simple and clever 👍

@blimmer
Copy link
Contributor Author

blimmer commented Sep 21, 2015

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
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