projects
/
mkws-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dbe2027
)
refactor to use local vars
author
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 21 Aug 2013 16:04:21 +0000
(18:04 +0200)
committer
Wolfram Schneider
<wosch@indexdata.dk>
Wed, 21 Aug 2013 16:04:21 +0000
(18:04 +0200)
test/spec/jsdom.spec.js
patch
|
blob
|
history
diff --git
a/test/spec/jsdom.spec.js
b/test/spec/jsdom.spec.js
index
77f6770
..
4edf683
100644
(file)
--- a/
test/spec/jsdom.spec.js
+++ b/
test/spec/jsdom.spec.js
@@
-4,13
+4,14
@@
*
*/
*
*/
-var jsdom = require('jsdom').jsdom;
-var myWindow = jsdom().createWindow();
-var $ = require('jquery');
-var jq = require('jquery').create();
-var jQuery = require('jquery').create(myWindow);
-
describe("jQuery suite", function() {
describe("jQuery suite", function() {
+ var jsdom = require('jsdom').jsdom;
+ var myWindow = jsdom().createWindow();
+
+ var $ = require('jquery');
+ var jq = require('jquery').create();
+ var jQuery = require('jquery').create(myWindow);
+
it("jQuery append test", function() {
jQuery("<h1>test passes h1</h1>").appendTo("body");
expect( jQuery("body").html() ).toMatch(/<h1>/);
it("jQuery append test", function() {
jQuery("<h1>test passes h1</h1>").appendTo("body");
expect( jQuery("body").html() ).toMatch(/<h1>/);
@@
-26,9
+27,6
@@
describe("jQuery suite", function() {
expect( jq("body").html() ).toMatch(/<h2>/);
});
expect( jq("body").html() ).toMatch(/<h2>/);
});
-});
-
-describe("jsdom suite", function() {
it("window test", function() {
expect(myWindow).toBeDefined();
});
it("window test", function() {
expect(myWindow).toBeDefined();
});