gemini-testing / gemini

💀💀💀[DEPRECATED] Use hermione
https://github.com/gemini-testing/hermione
MIT License
1.5k stars 149 forks source link

Coverage doesn't work properly #902

Open CrazySquirrel opened 6 years ago

CrazySquirrel commented 6 years ago

I faced some problems and bugs:

  1. After turning on coverage I got problem Error: ENOENT: no such file or directory, open '/.../null' (https://github.com/gemini-testing/gemini/issues/755)

This problem can be fixed if you add map and filter url equal to 'null' or filter at the stage of formation byURL in method addStatsForBrowser (gemini/lib/coverage.js)

  1. Url is not passed to the readUrl method from readUrlOrFile (gemini/lib/coverage.js)

  2. Without map method (from config) coverage can't resolve css files (I'm not sure if it's a bug or not, but it's annoying)

  3. Webpack adds prefix webpack:// in sourcemaps and coverage can't resolve it properly.

  4. Webpack doesn't resolve sourcemaps properly. For example, if build css is in the folder ...project/build/static/, then source file will be resolved like ...project/build/static/src/.../...scss, and this is wrong, because source file should be resolved like ...project/src/.../...scss

  5. Perhaps gemini should build coverage for js files that are responsible for rendering.

Thus, without some fixes in gemini/lib/coverage.js coverage doesn't work.