casper.die does not flush stdout

13 views
Skip to first unread message

juanexpe...@gmail.com

unread,
Apr 3, 2017, 6:24:39 PM4/3/17
to CasperJS
Hello everyone,

I am wondering if anyone has come across a smart way to assure casperjs die command actually flushes out all casper.log(msg, "info") entries before exiting.

Consider the exit scenario below:

casper.info('*-All tests for Visual Regression have ended-*');
if(true == self.hasATestFailed) {
casper.error("All tests have completed but at least 1 failure was found.");

casper.die("All tests completed. Overall status is failed.", 1);
} else {
casper.info("All tests have completed with NO failures found.");
casper.test.done();
}

Only the .error and .die message displays reliably but none of the casper.info messages make it out. I found the following node.js helper exeunt library to assure flushing of stdout but it seems casper.js script has no access to process?

Thanks!
~Juan


Reply all
Reply to author
Forward
0 new messages