-->

申请途径的模型钩qunit集成测试不会触发(application route's mode

2019-11-03 12:41发布

我有一个看起来像这样的路线:

App.ApplicationRoute = Ember.Route.extend({
  model: function() {
    console.log("caching books");
    this.store.find('books');
  }
});

当我在本地运行它,我看到控制台“缓存书”的消息。 但是,当我在qunit运行它的消息一直没有出现。

为什么申请途径的模型钩不qunit火?

这里是我的qunit集成测试:

module('Ember.js Library', {
  setup: function() {
    Ember.run(App, App.advanceReadiness);
  },
  teardown: function() {
    App.reset();
  }
});

test('root url redirects to leads list', function() {
  visit('/');
  andThen(function() {
    // assert
  });
});
文章来源: application route's model hook not triggering in qunit integration test