I've wrote a graph measurement library using TypeScript called EdgeJS. I've also wrote unit test using Jasmine to verify this it is correct.
The problem is that I have failing test and root cause, I think, is that I have a function to initialize arrays filled with zero instead of undefined and that initialization method seem to "remember" the array it has initialized which affect the results.
You can see in the console output of the unit test page that this line print out arrays with numbers and not just zero as I expected.