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

Called stop() outside of a test context #155

Closed
bugduino opened this issue Mar 20, 2015 · 2 comments
Closed

Called stop() outside of a test context #155

bugduino opened this issue Mar 20, 2015 · 2 comments

Comments

@bugduino
Copy link

With a simple test like this one:

test('Redirect to strategies after login', 1, function(assert) {
  visit("/");
  andThen(function() {
    equal(currentRouteName(), 'strategies.index');
  });
});

where the "/" route perform some async request on model and setupController hook.
The test passes but most of the time I get the error in the title raised multiple times.

I tryied something like:

test('Redirect to strategies after login', 1, function(assert) {
  stop();
  visit("/");
  andThen(function() {
    equal(currentRouteName(), 'strategies.index');
    start();
  });
});

but i get the same errors.

Can anyone point me to the right direction?
Thank you

@rwjblue
Copy link
Member

rwjblue commented Mar 22, 2015

Please provide an example JSBin showing the issue. You can use http://emberjs.jsbin.com/rwjblue/316/edit?html,js,output as a starting point.

@bugduino
Copy link
Author

Cannot reproduce the issue, is related to some async requests not performed in an Ember way

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