所以我是javascript的新手,我一直在浏览别人的代码,我发现了这个..
describe('deviceready', function() {
it('should report that it fired', function() {
spyOn(app, 'report');
app.deviceready();
expect(app.report).toHaveBeenCalledWith('deviceready');
});
});
我不明白的是:describe
关键字究竟是做什么的?
信息:
- 它是一个phonegap应用程序
- 我们正在使用spin.js和jQuery库