Skip to content
This repository was archived by the owner on Dec 4, 2019. It is now read-only.

Commit 76c59bb

Browse files
author
Amir Raminfar
committed
Fixes tests
1 parent 355f815 commit 76c59bb

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

shim.coffee

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ _phantom = mkwrap phantom,
147147
injectJs: (js, cb=->) -> cb phantom.injectJs js
148148
getCookies: (cb=->) -> cb(phantom.cookies)
149149
addCookie: (cookie, cb=->) ->
150-
cb(phantom.addCookie(cookie))
150+
phantom.addCookie(cookie)
151+
cb(true)
151152
clearCookies: (cb=->) -> cb phantom.clearCookies()
152153
createPage: (cb) -> cb pageWrap webpage.create()
153154
setProxy: (host, port, type, user, password, cb=->) ->

test/callbacks.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ describe "The phantom module (callbacks)",
7272

7373
countdown = setTimeout =>
7474
@callback 'timeout'
75-
, 500
75+
, 1000
7676

77-
"runs the onExit callback within 500ms": (status) ->
77+
"runs the onExit callback within 1000ms": (status) ->
7878
assert.equal status, 'success'

test/page.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ describe "Pages",
160160
page.evaluate (-> eval "syntaxerror[")
161161

162162
"which works correctly": (msg) ->
163-
assert.equal msg, "SyntaxError: Parse error"
163+
assert.equal msg, "SyntaxError: Unexpected EOF"
164164

165165
"can render the page to a file":
166166
topic: t (page) ->

0 commit comments

Comments
 (0)