You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
assertTrue([...skipKeys].every(key=>withoutSkipKeys.has(key)),"Skip results are not contained within without skip results: "+JSON.stringify(resultsWithSkip)+" "+JSON.stringify(resultsWithoutSkip));
424
424
},
425
425
426
426
testApproxL2Subquery: function(){
@@ -631,11 +631,11 @@ function VectorIndexCosineTestSuite() {
631
631
632
632
// For cosine similarity the results must be ordered in descending order
633
633
for(letj=1;j<results.length;++j){
634
-
assertTrue(results[j-1].sim>=results[j].sim);
634
+
assertTrue(results[j-1].sim>=results[j].sim,"Results are not in descending order: "+JSON.stringify(results));
635
635
}
636
636
// Assert that distances are in [-1, 1] range
637
637
for(letj=0;j<results.length;++j){
638
-
assertTrue(Math.abs(results[j].sim)<=1.01);
638
+
assertTrue(Math.abs(results[j].sim)<=1.01,"Cosine similarity is not in [-1, 1] range: "+JSON.stringify(results));
639
639
}
640
640
}
641
641
},
@@ -787,7 +787,7 @@ function VectorIndexInnerProductTestSuite() {
787
787
788
788
// For inner product metric the results must be ordered in descending order
789
789
for(letj=1;j<results.length;++j){
790
-
assertTrue(results[j-1].sim>=results[j].sim);
790
+
assertTrue(results[j-1].sim>=results[j].sim,"Results are not in descending order: "+JSON.stringify(results));
791
791
}
792
792
}
793
793
},
@@ -835,7 +835,7 @@ function VectorIndexInnerProductTestSuite() {
assertTrue([...skipKeys].every(key=>withoutSkipKeys.has(key)),"Skip results are not contained within without skip results: "+JSON.stringify(resultsWithSkip)+" "+JSON.stringify(resultsWithoutSkip));
0 commit comments