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

Is 'server' injected or should I import it? #59

Closed
jrjohnson opened this issue Mar 14, 2015 · 1 comment
Closed

Is 'server' injected or should I import it? #59

jrjohnson opened this issue Mar 14, 2015 · 1 comment

Comments

@jrjohnson
Copy link
Contributor

The docs seem to indicate that 'server' will be available and that I should use it and tell jshint about it. However it doesn't seem to be set on my tests??

If I run import Server from 'ember-cli-mirage/server'; that works, is that the correct way? Or is there some kind of global 'server' variable getting created that I should use?

@jrjohnson
Copy link
Contributor Author

Sorry I'm an idiot - you have to put calls to server after the application is initiated:

beforeEach: function() {
    application = startApp();
    //now there is a *server*
    server.createList('user', 11);
  },

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

1 participant