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

Setting resolver during tests #123

Closed
trentmwillis opened this issue Jun 1, 2016 · 2 comments
Closed

Setting resolver during tests #123

trentmwillis opened this issue Jun 1, 2016 · 2 comments

Comments

@trentmwillis
Copy link
Member

One pain point we've found while working with in-repo-engines is that integration/unit tests can be frustrating to get working properly. A large part of this is due to the resolver used by tests being set once globally and usually only reflects the resolver used by the host application and not the engine itself.

Since there are obviously scenarios where we would want to integration/unit test a component (or something else) within an in-repo-engine, it might make sense to build in a way to easily set the Engine associated with a specific test module. Something like:

import { test, moduleForComponent } from 'ember-qunit';

moduleForComponent('x-foo', {
  integration: true,
  engine: 'my-engine'
});

Which will grab the resolver and modulePrefix after looking up the Engine and use those for the resolver for the current test module.

Note: I believe we could work in support for this from this addon, but it would likely be better situated somewhere in ember-test-helpers.

@mydea
Copy link
Contributor

mydea commented Jul 27, 2016

Has there been any progress on this? We'd love to use integration tests for our in-repo engine's components.

@trentmwillis
Copy link
Member Author

This is now possible by setting a custom resolver per-module in ember-test-helpers@^0.5.33

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

No branches or pull requests

2 participants