【发布时间】:2014-04-14 13:54:52
【问题描述】:
您好 我刚开始使用 Jasmine。问题如下:我有许多模块,通过 RequireJS 管理。现在模块 A 在其中创建另一个模块 B 的实例。是否可以使用 Jasmine 测试是否在 A 中创建了 B 的实例?为了更清楚地传达代码的概念,我们有:
//In module A
define(['B',],function(B){
function test(){
var newTest = new B();
};
return {test: test};
});
现在,我如何使用 Jasmine 来测试模块 A,创建模块 B 的实例?提前致谢!
问候
【问题讨论】: