您的位置:首页 > 其它

jasmine: Don't make DOM manipulation outside 'beforeEach' and 'it'

2011-02-16 17:41 113 查看
jasmine will create Suite before loading the report html. You code like:
[javascript]
var canvasDiv;
canvasDiv = new Element('div', {'id': 'canvas'});
canvasDiv.update('hello world');
// the following makes the trouble
$(document.body).insert(canvasDiv);
[/javascript]
will fail the creation of jasmine.Suite. And you will get a error like:
[html]
jasmine.Suite() required http://localhost:8888/__JASMINE_ROOT__/lib/jasmine.js Line 1856
[/html]
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐