bestiejs / json3

A JSON polyfill. No longer maintained.
https://bestiejs.github.io/json3
Other
1.02k stars 150 forks source link

Poor code coverage in environments with spec-compliant native implementations #47

Open ghost opened 10 years ago

ghost commented 10 years ago

Istanbul currently reports that JSON 3 has 13.77% coverage. This is actually correct, since the native stringify and parse implementations are used in Node; however, this metric is also not very useful. I've merged d10/json3@a5e43925b7c8889e0d3d34f52d4082c758b58eff to squelch the Travis failures, but it would be wonderful to investigate how other polyfills measure code coverage.

bnjmnt4n commented 10 years ago

I think what we should do for this is to replace Node’s spec-compliant JSON implementation with a faulty one that doesn’t work correctly. We can then use Istanbul accurately to detect JSON3’s code coverage. @kitcambridge What do you think? If you’re fine with it I can experiment with this.