protobufjs / bytebuffer.js

A fast and complete ByteBuffer implementation using either ArrayBuffers in the browser or Buffers under node.js.
http://dcode.io
Apache License 2.0
723 stars 155 forks source link

Code coverage #14

Open pocesar opened 10 years ago

pocesar commented 10 years ago

Code coverage is almost perfect, Istanbul is reporting:

Statements: 88.32% (839 / 950)      
Branches: 74.66% (442 / 592)      
Functions: 95.51% (85 / 89)      
Lines: 90.28% (808 / 895)      
Ignored: none

Aim for 100% of code coverage is good thing since it's the "base" of Protobuf.js

dcodeIO commented 10 years ago

Ok, why not. How did you calculate this? Did it get any better with ByteBuffer 3?

pocesar commented 10 years ago

if I recall correctly it was

npm install istanbul -g
istanbul cover ./node_modules/testjs/bin/testjs tests/suite.js

didn't test it again, will do and report

EDIT: Nope, that's not the command line, I think I had to edit the test suite for it to be accepted on istanbul

pocesar commented 10 years ago

comment out the lines containing .log methods and do the coverage using nodeunit instead.

istanbul cover node_modules/nodeunit/bin/nodeunit tests

current coverage is worse than the first coverage


=============================== Coverage summary ===============================
Statements   : 57.05% ( 2642/4631 )
Branches     : 50.69% ( 2154/4249 )
Functions    : 63.48% ( 186/293 )
Lines        : 49.69% ( 1585/3190 )
================================================================================
dcodeIO commented 10 years ago

Well, that's sad. Looks like there is still a lot of testing work to do.