HuddleEng / PhantomFlow

Describe and visualise user flows through tests with PhantomJS
MIT License
682 stars 60 forks source link

Add a results object to done callback of phantomFlow.run() #31

Closed pixelheresy closed 9 years ago

pixelheresy commented 9 years ago

The 'done' function is the callback fired when the flow is finished running. Currently, it only send back an error code. However, with using phantomflow.run() in a scripted situation, some of the information [besides what it logged to stout and the exit code returned] is potential useful.

Therefore, besides issuing the done() callback with the error code, it now issues 'done( errorCode, resultsObject);' This object exposes failCount, passCount, and loggedErrors of the run() closure.