Testing EmberJS reset not fully reselling or asynchronously

If I reorder my Ember / Qunit tests, they will pass. Why is this or what can I do to avoid this?

Edit: I notice that Qunit tests run in more or less random order (depending on what is ready?), Regardless of when TEST B follows TEST A, it fails.

It seems that either App.reset () is not completely rebooting, or there is some kind of asynchronous access issue that I don't see.

Specification

module("Integration Tests", {
  setup: function() {
    console.log('reset');
    Encompass.reset();
  }
});

test("TEST A", function() {
  visit("/workspaces").then(function() {
    ok(true);
  });
});

test("TEST B", function() {
  visit('/workspaces/1/submissions/1').then(function() {
    ok(find('li[title="Kyle Folder 1"]').length, "the folder is there");
  });
});

I have both versions of the test online.

This uses an adapter adapter with a bunch of models (maybe not all the right relationships, but I still expect the tests to be consistent regardless of order)

+4
1

App.reset() ember, reset Ember Model/Data.

unloadAll Ember:

this.store.unloadAll('post');

Ember clearCache:

App.Post.clearCache();

ok A?

test("TEST A", function() {
  visit("/workspaces").then( function(){
    ok(true);
  });
});
+2

All Articles