Aat*_*asi 55 javascript jquery spine.js cordova
所以我是javascript的新手,我一直在浏览其他人的代码,我发现了这个...
describe('deviceready', function() {
it('should report that it fired', function() {
spyOn(app, 'report');
app.deviceready();
expect(app.report).toHaveBeenCalledWith('deviceready');
});
});
Run Code Online (Sandbox Code Playgroud)
我不明白的是:describe关键字到底是做什么的?
info:
- 它是一个phonegap应用程序
- 我们正在使用spine.js和jQuery库
小智 6
“测试套件首先调用全局Jasmine函数,并用两个参数描述:字符串和函数。字符串是规范套件的名称或标题 -通常是被测试的东西。函数是一段 代码,实现套件。”
来源:http : //jasmine.github.io/2.0/introduction.html
| 归档时间: |
|
| 查看次数: |
47293 次 |
| 最近记录: |