【发布时间】:2016-06-07 18:32:34
【问题描述】:
我使用 jQuery File Upload 作为 ember 组件。这个插件有一个 API,可以让我在测试中与文件上传 programmatically 进行交互。这在组件测试中非常有效。但是在验收测试中我得到这个错误:
断言失败:您打开了测试模式,这禁用了运行循环的自动运行。您需要在运行中包装任何具有异步副作用的代码
我的测试中的一个 sn-p:
// some steps before this.
andThen(() => {
Ember.run(() => {
find('.file-upload').fileupload('send', { files: [{name: 'file.doc' }] });
});
});
});
任何指针将不胜感激。
【问题讨论】:
标签: ember.js