JSCoverage is not 100%

Bug #587250 reported by XavierAntoviaque
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Humanity Project
Confirmed
Medium
Vlad Dragu

Bug Description

Revision history for this message
XavierAntoviaque (xavier-antoviaque) wrote :

Added Proppy to the thread - he may have some good comments

Changed in hackit:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Vlad Dragu (vlad-dragu)
milestone: none → alpha1.0
Revision history for this message
Johan Euphrosine (proppy) wrote :

You could turn hackit_reload and hackit_alert function definition into:

var hackit = {
      document: document,
      alert: alert
};

This way it will generate coverage data for the declaration, and you will still be able to mockup implementation in tests.

Revision history for this message
Vlad Dragu (vlad-dragu) wrote :

Thanks Proppy, it worked

Changed in hackit:
status: Confirmed → Fix Committed
Changed in hackit:
status: Fix Committed → Fix Released
Changed in hackit:
status: Fix Released → Confirmed
Revision history for this message
Vlad Dragu (vlad-dragu) wrote :

The coverage is at 99%. There is a single line of code not covered, a function that submits a form. I had to use a mock of that function in the js test because I couldn’t have the form submitted in the actual test.

Changed in hackit:
status: Confirmed → Incomplete
Revision history for this message
XavierAntoviaque (xavier-antoviaque) wrote :

ok - I'll put it for a later version; next time proppy does a review, we'll see how to fix this.

Changed in hackit:
milestone: alpha1.0 → alpha1.1
milestone: alpha1.1 → none
status: Incomplete → Confirmed
Revision history for this message
Vlad Dragu (vlad-dragu) wrote :

The js coverage is 98% for alpha1.2 (hackit.js)

Revision history for this message
Vlad Dragu (vlad-dragu) wrote :

I added missing test and brought back the js coverage to 98% after the 2.2 version (missions and chat blocks).
The uncovered code is mocked functions

Changed in hackit:
status: Confirmed → Incomplete
Revision history for this message
XavierAntoviaque (xavier-antoviaque) wrote :

jscoverage acts all weird on hackit.cx and shows low coverage % - cf http://hackit.cx/jscoverage/jscoverage.html?test/jstest.html

Changed in hackit:
status: Incomplete → Confirmed
Changed in hackit:
milestone: none → alpha4.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.