Ember.js 使接受测试依赖于顺序?

Ember.js 使接受测试依赖于顺序?,ember.js,qunit,ember-qunit,ember-testing,Ember.js,Qunit,Ember Qunit,Ember Testing,我有没有办法让测试顺序依赖,这样测试2直到测试1完成才开始?转到localhost:4200/tests以不确定的方式运行它们,有时它以正确的顺序运行,工作正常,但有时它运行无序,这可能会导致问题,是否有任何方法强制特定的顺序,但将它们保留在单独的测试函数中,我总是可以把测试的所有东西都放在一个大的测试函数中,这样顺序就可以一直工作,但我觉得它们应该被分解成它们自己的函数,任何指导都会很感激吗?下面的例子只是我想要的订单外观的一个示例测试 import Ember from 'ember'; i

我有没有办法让测试顺序依赖,这样测试2直到测试1完成才开始?转到localhost:4200/tests以不确定的方式运行它们,有时它以正确的顺序运行,工作正常,但有时它运行无序,这可能会导致问题,是否有任何方法强制特定的顺序,但将它们保留在单独的测试函数中,我总是可以把测试的所有东西都放在一个大的测试函数中,这样顺序就可以一直工作,但我觉得它们应该被分解成它们自己的函数,任何指导都会很感激吗?下面的例子只是我想要的订单外观的一个示例测试

import Ember from 'ember';
import startApp from '../helpers/start-app';

var application;

module('Acceptance: Login', {
  beforeEach: function() {
    application = startApp();
  },
  afterEach: function() {
    Ember.run(application, 'destroy');
  }
});


test('test 1', function(assert) {
  authenticateSession();

  andThen(function() {
    visit('/patients/1');
  });

  andThen(function() {
   assert.equal(currentRouteName(), 'patients.show.index', "Current route is patients.show.index");
  });

});

test('test 2', function(assert) {
  authenticateSession();

  andThen(function() {
    visit('/invoices/1');
  });

  andThen(function() {
   assert.equal(currentRouteName(), 'invoices.show.index', "Current route is invoices.show.index");
  });

});
你有没有试过使用这个软件


//在你加入QUnit之后。。。
QUnit.config.reorder=false;

使用ember-qunit和ember-cli,我会将其粘贴到哪里?谢谢你也许可以把它放在你发布的搜索结果的顶部,但不确定是不是有余烬。@flylib in
tests/index.html
就在
<script>
// after you include QUnit...
QUnit.config.reorder = false;
</script>