简体   繁体   English

骨干集成测试:Zombie.js和RequireJS,如何?

[英]Backbone integration tests: Zombie.js and RequireJS, how to?

I'm trying to test my Backbone.js web application. 我正在尝试测试Backbone.js Web应用程序。 Since this application is basically only consuming web services, there is not really business logic inside, and the app is simply addressing calls to our API. 由于此应用程序基本上仅消耗Web服务,因此内部没有真正的业务逻辑,该应用程序只是在处理对我们API的调用。

I'd like to use Zombie.js for ma integration test suit, which works - for the moment - with Karma and Jasmine . 我想将Zombie.js用于ma集成测试服,目前可与KarmaJasmine一起使用

My problem is I'm using RequireJS , and because Zombie doesn't seem to be AMD compliant, I can't import Zombie into my test view. 我的问题是我正在使用RequireJS ,并且由于Zombie似乎不符合AMD规范,因此无法将Zombie导入我的测试视图。

Any ideas? 有任何想法吗?

Can you include zombie js in your test runner? 您可以在测试运行器中包含zombie js吗? I think karma has a files array in its config 我认为业力在其配置中有一个文件数组

source: http://toon.io/how-to-setup-karma-javascript-test-runner/ 来源: http//toon.io/how-to-setup-karma-javascript-test-runner/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM