timurstrekalov / saga

Better code coverage tool for JavaScript.
http://timurstrekalov.github.com/saga/
Other
87 stars 25 forks source link

support for phantomjs running #125

Open zenonhun opened 9 years ago

zenonhun commented 9 years ago

There were some synchronization issues with phantomjs, these were fixed in HtmlUnitBasedScriptInstrumenter.java and ScriptData.java

I also added better support for jasmine-maven-plugin if it was executed with phantomjs. If you use jasmine with phatnomjs it runs the tests through a webserver, and saga also used this server to calculate coverage. Because of this, total coverage report was not possible, since it saw only the files tested by jasmine. To solve this, I expanded FileSystemSourcePreloader.java. If sourceDirs is defined in pom.xml, then it is used as full source directory.