【发布时间】:2013-09-08 06:03:19
【问题描述】:
我是单元测试的新手,jasmine,我想知道我们是否可以在函数内部测试私有方法。这是我正在尝试做的代码sn-p
function thisIsTheFunction(...) {
//Some Code
var thisIsTheMethod = function () {
//This Should be tested
}
//Someother Code
}
我知道我们可以测试thisIsTheFunction 是否附加到this。但是有没有办法测试该方法是否是私有的?
提前致谢!
【问题讨论】:
标签: javascript jquery unit-testing angularjs jasmine