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]
[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]
相关文章推荐
- It looks like you don't have a C compiler and make utility installed. 错误
- Chinese version QQ—how to install it and use it to make a audio call and video call
- Iterate through array, for each item with key collect value and make new array with key and array of
- Make sure the Cursor is initialized correctly before accessing data from it.
- 10 Reasons You Don't Need Hadoop For Your Data Analysis - Alternatives Must Try Before Using It
- 解决 Make sure the Cursor is initialized correctly before accessing data from it
- FreeBSD Try to set MAKE_JOBS_UNSAFE=yes and rebuild before
- Remove a route and make it permanent on ubuntu
- make the other person fell important and do it sincerely
- Create Spring MVC dynamic web project with Maven and make it support Eclipse IDE
- how to make Completion Handlers and use it in Swift
- Oracle Trigger :Before,after,each row and table level triggers ORA-04082 ORA-04084
- finally, i don't make it
- could not load the assembly 'app_web_***' Make sure that it is compiled before accessing the page
- android 出现Make sure the Cursor is initialized correctly before accessing data from it
- Don't Make Javascript Equality Look Worse Than It Is
- Android Run Time: An Easy Hack To Make Your Phone Faster And Its Battery Last Longer
- JQuery DOM HighLighter (it's a basic "Inspect element" simple implementation to mimic what webkit inspector and firebug do)
- Write a program to copy its input to its output, replacing each tab by \t, each backspace by \b, and each backslash by \\. This makes tabs and backspa
- “API design is like sex: Make one mistake and support it for the rest of your life.”