Skip to content
Browse files

JSDOM issue happens when page has no <html> element.

  • Loading branch information...
1 parent 64885f8 commit 382f85e99eb42ea130d588b0777c2aa6c9f3f40c @assaf committed
Showing with 4 additions and 4 deletions.
  1. +1 −0 package.json
  2. +1 −2 spec/css_spec.coffee
  3. +2 −2 spec/eventloop_spec.coffee
View
1 package.json
@@ -20,6 +20,7 @@
},
"dependencies": {
"coffee-script": "~1.2",
+ "htmlparser": "~1.7.4",
"jsdom": "~0.2.12",
"mime": "~1.2.5",
"ws": "~0.4.7"
View
3 spec/css_spec.coffee
@@ -5,11 +5,10 @@ Vows.describe("CSS").addBatch(
"opacity":
topic: ->
brains.get "/styled", (req, res)-> res.send """
- <body><div id="styled"></div></body>
+ <html><body><div id="styled"></div></body></html>
"""
browser = new Browser
browser.wants "http://localhost:3003/styled", =>
- console.log browser.query("#styled")
@callback null, browser.query("#styled").style
"should be formatted string": (style)->
View
4 spec/eventloop_spec.coffee
@@ -149,9 +149,9 @@ Vows.describe("EventLoop").addBatch(
topic: (browser)->
browser.wants "http://localhost:3003/eventloop/function", =>
browser.window.setInterval (-> @document.title += "."), 100
- browser.wait 100, =>
+ browser.wait 150, =>
setTimeout =>
- browser.wait 100, @callback
+ browser.wait 150, @callback
, 300
"should not fire": (browser)->
assert.equal browser.document.title, ".."

0 comments on commit 382f85e

Please sign in to comment.
Something went wrong with that request. Please try again.