-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Store not registered as service for tests #2994
Comments
Did this work with |
Thanks for reporting this issue @technomage. I've opened a pr at emberjs/ember-test-helpers#39 to try and get the |
Here is a work around I have used while waiting for the above pr to get merged. import {
moduleFor,
test
} from 'ember-qunit';
import { getContext } from 'ember-test-helpers';
import DS from 'ember-data';
moduleFor('service:product', {
// Specify the other units that are required for this test.
needs: ['model:product'],
beforeEach: function() {
// Register the store as a service. This can go away once
// https://github.com/switchfly/ember-test-helpers/pull/39 is
// merged.
var context = getContext();
context.container.register('service:store', DS.Store);
}
}); |
@technomage try version Please note that you should NOT include |
Thanks. I will update ASAP. |
Trying to test a component that has the following fails because the service:store is not defined.
moduleForComponent('actor-table', {
// specify the other units that are required for this test
needs: ['service:store']
});
The text was updated successfully, but these errors were encountered: