Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
JSDOM issue happens when page has no <html> element.
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Feb 24, 2012
1 parent 64885f8 commit 382f85e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
}, },
"dependencies": { "dependencies": {
"coffee-script": "~1.2", "coffee-script": "~1.2",
"htmlparser": "~1.7.4",
"jsdom": "~0.2.12", "jsdom": "~0.2.12",
"mime": "~1.2.5", "mime": "~1.2.5",
"ws": "~0.4.7" "ws": "~0.4.7"
Expand Down
3 changes: 1 addition & 2 deletions spec/css_spec.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ Vows.describe("CSS").addBatch(
"opacity": "opacity":
topic: -> topic: ->
brains.get "/styled", (req, res)-> res.send """ 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 = new Browser
browser.wants "http://localhost:3003/styled", => browser.wants "http://localhost:3003/styled", =>
console.log browser.query("#styled")
@callback null, browser.query("#styled").style @callback null, browser.query("#styled").style


"should be formatted string": (style)-> "should be formatted string": (style)->
Expand Down
4 changes: 2 additions & 2 deletions spec/eventloop_spec.coffee
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ Vows.describe("EventLoop").addBatch(
topic: (browser)-> topic: (browser)->
browser.wants "http://localhost:3003/eventloop/function", => browser.wants "http://localhost:3003/eventloop/function", =>
browser.window.setInterval (-> @document.title += "."), 100 browser.window.setInterval (-> @document.title += "."), 100
browser.wait 100, => browser.wait 150, =>
setTimeout => setTimeout =>
browser.wait 100, @callback browser.wait 150, @callback
, 300 , 300
"should not fire": (browser)-> "should not fire": (browser)->
assert.equal browser.document.title, ".." assert.equal browser.document.title, ".."
Expand Down

0 comments on commit 382f85e

Please sign in to comment.