This is a common error.. and my PR can be read interpreted as a readability improvement request rather than an bug report.
Looking at test/geo-voronoi-test.js
As the sites variable in scope is a file level variable... plus the fact that it is defined twice, it means it is always overwritten before being used.
From looking at this in the debugger I can say this ...
A) It is ineffectually defined first as a 2-point array
B) Redefined as a 3 point array
C) Used in all test methods as a 3 point array. no matter the relative position on the test method.
The confusion is that
1) sites is needlessly defined twice
2) That the casual reader might assume the 2-point definition is actually being used in some tests.
Anyway a semi trivial issue .. I just want to make the code more readable.
This is a common error.. and my PR can be read interpreted as a readability improvement request rather than an bug report.
Looking at test/geo-voronoi-test.js
As the sites variable in scope is a file level variable... plus the fact that it is defined twice, it means it is always overwritten before being used.
From looking at this in the debugger I can say this ...
A) It is ineffectually defined first as a 2-point array B) Redefined as a 3 point array C) Used in all test methods as a 3 point array. no matter the relative position on the test method.
The confusion is that
1) sites is needlessly defined twice 2) That the casual reader might assume the 2-point definition is actually being used in some tests.
Anyway a semi trivial issue .. I just want to make the code more readable.