Javascript emberjs-测试-单击带有指向帮助器的链接的链接

Javascript emberjs-测试-单击带有指向帮助器的链接的链接,javascript,testing,ember.js,mocha.js,Javascript,Testing,Ember.js,Mocha.js,我尝试在我的应用程序上实现一些测试 当我执行单击(“.on action元素”)时,它工作得非常好,但当我尝试在使用{{{{#link to}}帮助程序构建的元素上执行相同操作时,我出现了此错误 Uncaught Error: Assertion Failed: You have turned on testing mode, which disabled the run-loop's autorun. You will need to wrap any code with asynchron

我尝试在我的应用程序上实现一些测试

当我执行
单击(“.on action元素”)
时,它工作得非常好,但当我尝试在使用
{{{{#link to}}
帮助程序构建的元素上执行相同操作时,我出现了此错误

Uncaught Error: Assertion Failed: You have turned on testing mode, which disabled the
run-loop's autorun. 
You will need to wrap any code with asynchronous side-effects in an
Ember.run 
我试着做:

it('can click on link', function (done) {
    Ember.run(function() {
        click('a:contains("demo")');
    });
});

但结果是一样的。我错过了什么?

安装程序中的所有代码都应该打包到Em.run中

setup: function () {
  Em.run(function () {
    //code to prepare environment
  });
}    

好的,我发现了我的错误,我设置了一个错误的setTimeout,而不是使用Ember.run.later