stevendesu / jsindex

1 stars 0 forks source link

Typo in search method #9

Closed stevendesu closed 5 years ago

stevendesu commented 5 years ago

I'll have to investigate why my unit tests are passing despite this extremely obvious bug in the search method:

for (let i = 1; 1 < idxs.length - 1; i++)

Should be:

for (let i = 1; i < idxs.length - 1; i++)
stevendesu commented 5 years ago

Looks like I was only testing for 1 and 2 search criteria. It broke with 3 or more.