dwyl / learn-istanbul

:checkered_flag: Learn how to use the Istanbul JavaScript Code Coverage Tool
339 stars 41 forks source link

Check in #15

Open durja opened 6 years ago

durja commented 6 years ago

Hi,

I am not sure if this was intended in the first place or a typo. I was learning from your article and the first time I ran code coverage on mischief.js, it had a 100% coverage. After scratching my head for sometime, I realized it's doing what the test asked it to do. I had to update the 20000 to number < 10000 to have the right output.

console.log("\nExpect Account1 Opening Balance "+getAccountBalance(account1) +" === 0 \u2713 "); creditAccount(account1, 2000, 'Add Funds'); transferMoney(account1,account2, 100, 'Give money to friend'); transferMoney(account2,account1, 10, 'Transfer back 10');

nelsonic commented 6 years ago

@durja thanks for opening this issue! please create a Pull Request to fix it. thanks!

durja commented 6 years ago

@nelsonic - I have submitted a PR for this.