Error: Cannot find module 'module' Started #0 phantom global object: should exist PASS #1 phantom global object: should have args property PASS #2 phantom global object: should have args as an array PASS #3 phantom global object: should have libraryPath property PASS #4 phantom global object: should have libraryPath as a string PASS #5 phantom global object: should not have an empty libraryPath PASS #6 phantom global object: should have scriptName property PASS #7 phantom global object: should have scriptName as a string PASS #8 phantom global object: should not have an empty scriptName PASS #9 phantom global object: should have outputEncoding property PASS #10 phantom global object: should have the default outputEncoding of UTF-8 PASS #11 phantom global object: should have version property PASS #12 phantom global object: should return 1 as the major version PASS #13 phantom global object: should return 9 as the minor version PASS #14 phantom global object: should return 7 as the patch version PASS #15 phantom global object: should have 'injectJs' function PASS #16 phantom global object: should have 'exit' function PASS #17 phantom global object: should have 'cookiesEnabled' property, and should be 'true' by default PASS #18 phantom global object: should be able to get the error signal handler that is currently set on it FAIL #19 WebPage constructor: should exist in window PASS #20 WebPage constructor: should be a function PASS #21 WebPage object: should be creatable PASS #22 WebPage object: should be able to get any signal handler that are currently set on it FAIL #23 WebPage object: should be able to get any callback handler that are currently set on it FAIL #24 WebPage object: should be able to get the error signal handler that is currently set on it (currently a special 1-off case) FAIL #25 WebPage object: should pass variables from/to window.callPhantom/page.onCallback FAIL #26 WebPage object: should pass result from/to window.confirm/page.onConfirm FAIL #27 WebPage object: should pass result from/to window.prompt/page.onPrompt FAIL #28 WebPage object: should have 'clipRect' property PASS #29 WebPage object: should have clipRect with height 0 PASS #30 WebPage object: should have clipRect with left 0 PASS #31 WebPage object: should have clipRect with top 0 PASS #32 WebPage object: should have clipRect with width 0 PASS #33 WebPage object: should have 'content' property PASS #34 WebPage object: should have 'content' as a string PASS #35 WebPage object: should have 'plainText' property PASS #36 WebPage object: should have 'plainText' as a string PASS #37 WebPage object: should have 'libraryPath' property PASS #38 WebPage object: should have 'libraryPath' as a string PASS #39 WebPage object: should have 'offlineStoragePath' property PASS #40 WebPage object: should have 'offlineStoragePath' as a string PASS #41 WebPage object: should have 'offlineStorageQuota' property PASS #42 WebPage object: should have objectName as 'WebPage' PASS #43 WebPage object: should have 'paperSize' property PASS #44 WebPage object: should have paperSize as an empty object PASS #45 WebPage object: should have 'scrollPosition' property PASS #46 WebPage object: should have scrollPosition with left 0 PASS #47 WebPage object: should have scrollPosition with top 0 PASS #48 WebPage object: should have 'settings' property PASS #49 WebPage object: should have non-empty settings PASS #50 WebPage object: should have 'customHeaders' property PASS #51 WebPage object: should have customHeaders as an empty object PASS #52 WebPage object: should have 'zoomFactor' property PASS #53 WebPage object: should have zoomFactor of 1 PASS #54 WebPage object: should have 'event' property PASS #55 WebPage object: should have 'cookies' property PASS #56 WebPage object: should have 'viewportSize' property PASS #57 WebPage object: should have viewportSize with height 300 PASS #58 WebPage object: should have viewportSize with width 400 PASS #59 WebPage object: should have 'deleteLater' function PASS #60 WebPage object: should have 'destroyed' function PASS #61 WebPage object: should have 'evaluate' function PASS #62 WebPage object: should have 'initialized' function PASS #63 WebPage object: should have 'injectJs' function PASS #64 WebPage object: should have 'javaScriptAlertSent' function PASS #65 WebPage object: should have 'javaScriptConsoleMessageSent' function PASS #66 WebPage object: should have 'loadFinished' function PASS #67 WebPage object: should have 'loadStarted' function PASS #68 WebPage object: should have 'openUrl' function PASS #69 WebPage object: should have 'release' function PASS #70 WebPage object: should have 'close' function PASS #71 WebPage object: should have 'render' function PASS #72 WebPage object: should have 'resourceReceived' function PASS #73 WebPage object: should have 'resourceRequested' function PASS #74 WebPage object: should have 'resourceError' function PASS #75 WebPage object: should have 'uploadFile' function PASS #76 WebPage object: should have 'sendEvent' function PASS #77 WebPage object: should have 'childFramesCount' function PASS #78 WebPage object: should have 'childFramesName' function PASS #79 WebPage object: should have 'switchToChildFrame' function PASS #80 WebPage object: should have 'switchToMainFrame' function PASS #81 WebPage object: should have 'switchToParentFrame' function PASS #82 WebPage object: should have 'currentFrameName' function PASS #83 WebPage object: should have 'addCookie' function PASS #84 WebPage object: should have 'deleteCookie' function PASS #85 WebPage object: should have 'clearCookies' function PASS #86 WebPage object: should have 'setContent' function PASS #87 WebPage object: should set content and location PASS #88 WebPage object: should handle keydown event PASS #89 WebPage object: should handle keyup event PASS #90 WebPage object: should handle keypress event PASS #91 WebPage object: should handle keypress event with inputs PASS #92 WebPage object: should handle keypress event of string with inputs PASS #93 WebPage object: should handle key events with modifier keys PASS #94 WebPage object: should send proper key codes for text PASS #95 WebPage object: should handle keypress event of umlaut char with inputs PASS #96 WebPage object: should handle mousedown event PASS #97 WebPage object: should handle mouseup event PASS #98 WebPage object: should handle mousemove event PASS #99 WebPage object: should handle click event PASS #100 WebPage object: should handle doubleclick event PASS #101 WebPage object: should handle file uploads FAIL #102 WebPage object: should support console.log with multiple arguments FAIL #103 WebPage object: should not load any NPAPI plugins (e.g. Flash) PASS #104 WebPage object: reports unhandled errors FAIL #105 WebPage object: doesn't report handled errors PASS #106 WebPage object: reports the sourceURL and line of errors FAIL #107 WebPage object: reports the stack of errors FAIL ReferenceError: Can't find variable: zomg #108 WebPage object: reports errors that occur in the main context FAIL #109 WebPage object: should set custom headers properly FAIL #110 WebPage object: should process request body properly for POST FAIL #111 WebPage object: should return properly from a 401 status FAIL #112 WebPage object: should set valid cookie properly, then remove it FAIL #113 WebPage object: should not set invalid cookies FAIL #114 WebPage object: should add a cookie FAIL #115 WebPage object: should delete a cookie FAIL #116 WebPage object: should pass variables to functions properly FAIL #117 WebPage object: should open url using secure connection FAIL #118 WebPage object: should handle resource request errors FAIL #119 WebPage object: should change a url request with an encoded query string PASS #120 WebPage object: should able to abort a network request FAIL #121 WebPage object: should fail on secure connection to url with bad cert FAIL #122 WebPage object: should change the url of the request FAIL #123 WebPage object: should fire `onResourceReceived` callback when the resource error occured FAIL #124 WebPage construction with options: should accept an opts object PASS #125 specifying clipRect: should have 'clipRect' property PASS #126 specifying clipRect: should have clipRect with height 100 PASS #127 specifying clipRect: should have clipRect with left 10 PASS #128 specifying clipRect: should have clipRect with top 20 PASS #129 specifying clipRect: should have clipRect with width 200 PASS #130 specifying onConsoleMessage: should have onConsoleMessage that was specified FAIL #131 specifying onLoadStarted: should have onLoadStarted that was specified FAIL #132 specifying onLoadFinished: should have onLoadFinished that was specified FAIL #133 specifying scrollPosition: should have 'scrollPosition' property PASS #134 specifying scrollPosition: should have scrollPosition with left 1 PASS #135 specifying scrollPosition: should have scrollPosition with top 2 PASS #136 specifying timeout: should have timeout as 100 PASS #137 specifying userAgent: should have userAgent as 'PHANTOMJS-TEST-USER-AGENT' PASS #138 specifying viewportSize: should have 'viewportSize' property PASS #139 specifying viewportSize: should have viewportSize with height 100 PASS #140 specifying viewportSize: should have viewportSize with width 200 PASS #141 WebPage switch frame of execution (deprecated API): should load a page full of frames PASS #142 WebPage switch frame of execution (deprecated API): should be able to detect frames at level 0 PASS #143 WebPage switch frame of execution (deprecated API): should go down to a child frame at level 1 PASS #144 WebPage switch frame of execution (deprecated API): should go down to a child frame at level 2 PASS #145 WebPage switch frame of execution (deprecated API): should go up to the parent frame at level 1 PASS #146 WebPage switch frame of execution (deprecated API): should go down to a child frame at level 2 (again) PASS #147 WebPage switch frame of execution (deprecated API): should go up to the main (top) frame at level 0 PASS #148 WebPage switch frame of execution (deprecated API): should go down to (the other) child frame at level 1 PASS #149 WebPage switch frame of execution: should load a page full of frames PASS #150 WebPage switch frame of execution: should be able to detect frames at level 0 PASS #151 WebPage switch frame of execution: should go down to a child frame at level 1 PASS #152 WebPage switch frame of execution: should go down to a child frame at level 2 PASS #153 WebPage switch frame of execution: should go up to the parent frame at level 1 PASS #154 WebPage switch frame of execution: should go down to a child frame at level 2 (again) PASS #155 WebPage switch frame of execution: should go up to the main (top) frame at level 0 PASS #156 WebPage switch frame of execution: should go down to (the other) child frame at level 1 PASS #157 WebPage switch frame of execution: should have top level as focused frame PASS #158 WebPage switch frame of execution: should move focus to level 1 frame PASS #159 WebPage switch frame of execution: should move focus to level 2 frame PASS #160 WebPage switch frame of execution: should move focus back to main frame PASS #161 WebPage switch frame of execution: should maintain focus but move current frame PASS #162 WebPage switch frame of execution: should change current frame to focused frame PASS #163 WebPage opening and closing of windows/child-pages: should call 'onPageCreated' every time a call to 'window.open' is done PASS #164 WebPage opening and closing of windows/child-pages: should correctly resize the 'pages' array if a page gets closed PASS #165 WebPage opening and closing of windows/child-pages: should resize the 'pages' array even more, when closing a page directly PASS #166 WebPage timeout handling: should call 'onResourceTimeout' on timeout FAIL #167 WebPage closing notification/alerting: should call 'onClosing' when 'page.close()' is called FAIL #168 WebPage closing notification/alerting: should call 'onClosing' when a page closes on it's own FAIL #169 WebPage closing notification/alerting: closing propagation control: should close all 4 pages if parent page is closed (default value for 'ownsPages') FAIL #170 WebPage closing notification/alerting: closing propagation control: should NOT close all 4 pages if parent page is closed, just parent itself ('ownsPages' set to false) FAIL #171 WebPage 'onFilePicker': should be able to set the file to upload when the File Picker is invoked (i.e. clicking on a 'input[type=file]') PASS #172 WebPage navigation events: should navigate to relative url using window.location FAIL #173 WebPage loading/loadingProgress properties: should not be loading when page has just been created PASS #174 WebPage loading/loadingProgress properties: should be loading when 'page.open' is invoked PASS #175 WebPage loading/loadingProgress properties: should be completed when page is fully loaded FAIL #176 WebPage render image: should render PDF file FAIL #177 WebPage render image: should render PDF file with format option FAIL #178 WebPage render image: should render GIF file FAIL #179 WebPage render image: should render GIF file with format option FAIL #180 WebPage render image: should render PNG file FAIL #181 WebPage render image: should render PNG file with format option FAIL #182 WebPage render image: should render JPEG file with quality option FAIL #183 WebPage render image: should render JPEG file with format and quality option FAIL #184 WebServer constructor: should not exist in window PASS #185 WebServer constructor: should be a function PASS #186 WebServer object: should be creatable PASS #187 WebServer object: should have objectName as 'WebServer' PASS #188 WebServer object: should have 'port' property PASS #189 WebServer object: should have port as string PASS #190 WebServer object: should not listen to any port by default PASS #191 WebServer object: should have 'listenOnPort' function PASS #192 WebServer object: should have 'newRequest' function PASS #193 WebServer object: should have 'close' function PASS #194 WebServer object: should fail to listen to blocked ports PASS #195 WebServer object: should be able to listen to some port FAIL #196 WebServer object: should handle requests FAIL #197 WebServer object: should handle post requests ('Content-Type' = 'application/x-www-form-urlencoded') FAIL #198 WebServer object: should handle post requests ('Content-Type' = 'ANY') FAIL #199 WebServer object: should handle binary data FAIL #200 Basic Files API (read, write, remove, ...): should be able to create and write a file PASS #201 Basic Files API (read, write, remove, ...): should be able to create (touch) an empty file PASS #202 Basic Files API (read, write, remove, ...): should be able to read content from a file PASS #203 Basic Files API (read, write, remove, ...): should be able to read specific number of bytes from a specific position in a file PASS #204 Basic Files API (read, write, remove, ...): should be able to read/write/append content from a file PASS #205 Basic Files API (read, write, remove, ...): should be able to copy a file PASS #206 Basic Files API (read, write, remove, ...): should be able to move a file PASS #207 Basic Files API (read, write, remove, ...): should be able to remove a (moved) file PASS #208 Basic Files API (read, write, remove, ...): should be able to remove a (copied) file PASS #209 Basic Files API (read, write, remove, ...): should be able to remove an empty file PASS #210 Basic Files API (read, write, remove, ...): should throw an exception when trying to open for read a non existing file PASS #211 Basic Files API (read, write, remove, ...): should throw an exception when trying to copy a non existing file PASS #212 Basic Files API (read, write, remove, ...): should be read/write utf8 text by default PASS #213 Basic Files API (read, write, remove, ...): should be read/write binary data PASS #214 Basic Files API (read, write, remove, ...): should be read/write binary data (shortcuts) PASS #215 Attributes Files API: should throw an exception when trying to read the size of a non existing file PASS #216 Attributes Files API: should return a null Date object when trying to read the last modified date of a non existing file PASS #217 Attributes Files API: should create temporary file 'temp-02.test' and writes some content in it PASS #218 Attributes Files API: should be able to read the size of a temporary file 'temp-02.test' PASS #219 Attributes Files API: should be able to read the Date on which a temporary file 'temp-02.test' was last modified PASS #220 Attributes Files API: should remove temporary file 'temp-02.test' PASS #221 Files and Directories API: should create a new temporary directory and change the Current Working Directory to it PASS #222 Files and Directories API: should create a file in the Current Working Directory and check it's absolute path PASS #223 Files and Directories API: should return to previous Current Working Directory and remove temporary directory PASS #224 Files and Directories API: should copy Content of the '/test/' Directory in a temporary directory, compare with the original and then remove PASS #225 Files and Directories API: should have readLink function PASS #226 fs.join(...): empty parts PASS #227 fs.join(...): one part (empty string) PASS #228 fs.join(...): one part (array) PASS #229 fs.join(...): empty string and one part PASS #230 fs.join(...): empty string and multiple parts PASS #231 fs.join(...): empty string and multiple parts with empty strings PASS #232 fs.join(...): multiple parts PASS #233 fs.join(...): multiple parts with empty strings PASS #234 fs.split(path): should split absolute path with trailing separator PASS #235 fs.split(path): should split absolute path without trailing separator PASS #236 fs.split(path): should split non-absolute path with trailing separator PASS #237 fs.split(path): should split non-absolute path without trailing separator PASS #238 fs.split(path): should split path with consecutive separators PASS #239 Tests Files API: should create some temporary file and directory PASS #240 Tests Files API: should confirm that test file and test dir exist, while the absent ones don't PASS #241 Tests Files API: should confirm that the temporary directory is infact a directory, while the absent one doesn't PASS #242 Tests Files API: should confirm that the temporary file is infact a file, while the absent one doesn't PASS #243 Tests Files API: should confirm that a relative path is not absolute, while an absolute one is PASS #244 Tests Files API: should confirm that temporary file is readable, writable and non-executable, while absent file is none of those PASS #245 Tests Files API: should confirm that temporary directory is readable, writable and executable, while absent dir is none of those PASS #246 Tests Files API: should confirm that neither temporary file/dir or absent file/dir are links PASS #247 Tests Files API: should delete the temporary directory and file PASS #248 System object: should exist PASS #249 System object: should have pid property PASS #250 System object: should have pid as a number PASS #251 System object: should have pid that is an integer PASS #252 System object: should have pid greater than 0 PASS #253 System object: should have platform as string PASS #254 System object: should have platform set to 'phantomjs' PASS #255 System object: should have args as array PASS #256 System object: should have args with at least one item PASS #257 System object: should have args[0] as the this test runner PASS #258 System object: should have env as object PASS #259 System object: should have os as object PASS #260 System object: should have isSSLSupported as boolean PASS #261 System object: should have stdout as object PASS #262 System object: should have stderr as object PASS #263 System object: should have stdin as object PASS #264 WebKit: should construct date in mm-dd-yyyy format PASS #265 WebKit: should parse date in ISO8601 format (yyyy-mm-dd) PASS #266 WebKit: should not crash when failing to dirty lines while removing a inline. PASS #267 Module: has filename property containing its absolute path PASS #268 Module: has id property equal to filename PASS #269 Module: has dirname property containing absolute path to its directory PASS #270 Module: its require() can be used externally PASS #271 require(): loads 'webpage' native module PASS #272 require(): loads 'fs' native module PASS #273 require(): loads 'webserver' native module PASS #274 require(): loads 'system' native module PASS #275 require(): loads CoffeeScript modules FAIL #276 require(): doesn't expose CoffeeScript PASS #277 require(): loads JSON modules PASS #278 require(): loads modules with specified extension PASS #279 require(): caches modules PASS #280 require(): supports cycles (circular dependencies) PASS #281 require(): has cache object attached containing cached modules PASS #282 require(): throws an error with appropriate message when module not found PASS #283 require(): maintains proper .stack when module not found FAIL #284 require(): maintains proper .stack when an error is thrown in module's exports FAIL #285 stub(): stubs modules in given context PASS #286 stub(): stubs modules in child context PASS #287 stub(): doesn't stub in parent context PASS #288 when invoked with a factory function: initializes the module lazily PASS #289 when invoked with a factory function: doesn't reinitialize the module each time it's required PASS #290 when the path is relative: loads modules from the same directory PASS #291 when the path is relative: loads modules from the parent directory PASS #292 when the path is relative: loads modules from a child directory PASS #293 when the path is relative: loads modules from a deeper directory PASS #294 when the path is relative: loads modules when path has intertwined '..' PASS #295 when the path is relative: loads modules when path has intertwined '.' PASS #296 when loading from node_modules: first tries to load from ./node_modules PASS #297 when loading from node_modules: loads from ../node_modules PASS #298 when loading from node_modules: loads from further up the directory tree PASS #299 when module is a directory: first tries to load the path from package.json PASS #300 when module is a directory: loads index.js if package.json not found PASS #301 when path is absolute: loads modules from the absolute path PASS #302 WebPage CJK support: Shift_JIS FAIL #303 WebPage CJK support: EUC-JP FAIL #304 WebPage CJK support: ISO-2022-JP FAIL #305 WebPage CJK support: Big5 FAIL #306 WebPage CJK support: GBK FAIL #307 WebPage CJK support: EUC-KR FAIL phantom global object should be able to get the error signal handler that is currently set on it WebPage object should be able to get any signal handler that are currently set on it WebPage object should be able to get any callback handler that are currently set on it WebPage object should be able to get the error signal handler that is currently set on it (currently a special 1-off case) WebPage object should pass variables from/to window.callPhantom/page.onCallback WebPage object should pass result from/to window.confirm/page.onConfirm WebPage object should pass result from/to window.prompt/page.onPrompt WebPage object should handle file uploads execute next_ onComplete WebPage object should support console.log with multiple arguments WebPage object reports unhandled errors WebPage object reports the sourceURL and line of errors WebPage object reports the stack of errors execute next_ onComplete WebPage object reports errors that occur in the main context execute next_ onComplete WebPage object should set custom headers properly WebPage object should process request body properly for POST WebPage object should return properly from a 401 status WebPage object should set valid cookie properly, then remove it WebPage object should not set invalid cookies WebPage object should add a cookie WebPage object should delete a cookie WebPage object should pass variables to functions properly WebPage object should open url using secure connection WebPage object should handle resource request errors WebPage object should able to abort a network request WebPage object should fail on secure connection to url with bad cert WebPage object should change the url of the request WebPage object should fire `onResourceReceived` callback when the resource error occured WebPage construction with options specifying onConsoleMessage should have onConsoleMessage that was specified WebPage construction with options specifying onLoadStarted should have onLoadStarted that was specified WebPage construction with options specifying onLoadFinished should have onLoadFinished that was specified WebPage timeout handling should call 'onResourceTimeout' on timeout WebPage closing notification/alerting should call 'onClosing' when 'page.close()' is called WebPage closing notification/alerting should call 'onClosing' when a page closes on it's own WebPage closing notification/alerting: closing propagation control should close all 4 pages if parent page is closed (default value for 'ownsPages') WebPage closing notification/alerting: closing propagation control should NOT close all 4 pages if parent page is closed, just parent itself ('ownsPages' set to false) WebPage navigation events should navigate to relative url using window.location WebPage loading/loadingProgress properties should be completed when page is fully loaded WebPage render image should render PDF file WebPage render image should render PDF file with format option WebPage render image should render GIF file WebPage render image should render GIF file with format option WebPage render image should render PNG file WebPage render image should render PNG file with format option WebPage render image should render JPEG file with quality option WebPage render image should render JPEG file with format and quality option WebServer object should be able to listen to some port WebServer object should handle requests WebServer object should handle post requests ('Content-Type' = 'application/x-www-form-urlencoded') WebServer object should handle post requests ('Content-Type' = 'ANY') WebServer object should handle binary data require() loads CoffeeScript modules compile loadFile _load require require execute next_ start execute next_ start execute next_ onComplete finish next_ onComplete finish next_ onComplete require() maintains proper .stack when module not found assert match execute next_ start execute next_ start execute next_ onComplete finish next_ onComplete finish next_ onComplete require() maintains proper .stack when an error is thrown in module's exports assert match execute next_ start execute next_ start execute next_ onComplete finish next_ onComplete finish next_ onComplete WebPage CJK support Shift_JIS WebPage CJK support EUC-JP WebPage CJK support ISO-2022-JP WebPage CJK support Big5 WebPage CJK support GBK WebPage CJK support EUC-KR Finished in 92.729 seconds 308 specs, 73 failures