We use Jasmine for our tests and this has worked well until trying to run our tests with Ember 1.11. The issue is that Ember’s async test helpers aren’t resolving the same way they used to in our tests so this test no longer works:
visit(route);
expect(find('.class')).toExist(); // visit hasn't finished resolving, so the expected element is not present in the DOM
Wrapping the expect
like this in an andThen
does work, but I’d rather not go through and change all our tests like this.
visit(route).andThen(function() {
expect(find('.class')).toExist(); // element now exists
});
After some head scratching I found this commit in Ember 1.11 that changed how async test helpers seem to work (if I use the previous code our tests work), but I’m not sure how/if we should update our test adapter to handle this going forward. Is anyone else using Jasmine on more current versions of Ember.