Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Application.buildInstance if possible to create owner for use in tests. #234

Closed
rwjblue opened this issue Nov 5, 2017 · 0 comments
Closed
Assignees

Comments

@rwjblue
Copy link
Member

rwjblue commented Nov 5, 2017

Application.prototype.buildInstance is exactly what is done in "reality" to build the owner object. We should migrate to a setup where the host application sets up the application under test (essentially replacing what is done viasetResolver) in its test-helper.js and then for each test we do something like this.owner = previouslyCreatedApplicationInstance.buildInstance();.

This would essentially provide the following benefits:

  • Run initializers removing the (fairly large) divide between "acceptance" and "integration" tests
    • Automatically run initializers once (for the entire test suite)
    • Run instance-initializers per-test
  • Share the registry for all tests (avoiding wasted work per test)
  • Align our setup process for all test types in preparation for handling acceptance tests in the same manner.
  • Remove the need for significant amounts of private API usage around Ember._RegistryProxyMixin / Ember._ContainerProxyMixin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant