@@ -449,6 +449,8 @@ describe('DataChunks', () => {
449
449
assert . equal ( totals . toptime . mean , 150 ) ;
450
450
assert . equal ( totals . clickcount . sum , 1 ) ;
451
451
assert . equal ( totals . clickcount . mean , 0.5 ) ;
452
+ assert . equal ( totals . clickcount . min , 0 ) ;
453
+ assert . equal ( totals . clickcount . max , 1 ) ;
452
454
} ) ;
453
455
454
456
it ( 'DataChunk.aggregate()' , ( ) => {
@@ -822,7 +824,7 @@ describe('DataChunks', () => {
822
824
} ) ;
823
825
824
826
describe ( 'DataChunks.hasConversion' , ( ) => {
825
- const chunks = [
827
+ const testChunks = [
826
828
{
827
829
date : '2024-05-06' ,
828
830
rumBundles : [
@@ -887,7 +889,7 @@ describe('DataChunks.hasConversion', () => {
887
889
888
890
it ( 'will tag bundles with convert and not-convert based on a filter spec' , ( ) => {
889
891
const d = new DataChunks ( ) ;
890
- d . load ( chunks ) ;
892
+ d . load ( testChunks ) ;
891
893
892
894
const spec = {
893
895
facetOne : [ 'top' ] ,
@@ -906,7 +908,7 @@ describe('DataChunks.hasConversion', () => {
906
908
907
909
it ( 'unknown facet in filter spec' , ( ) => {
908
910
const d = new DataChunks ( ) ;
909
- d . load ( chunks ) ;
911
+ d . load ( testChunks ) ;
910
912
911
913
const spec = {
912
914
facetOne : [ 'top' ] ,
@@ -937,7 +939,7 @@ describe('DataChunks.addClusterFacet()', () => {
937
939
938
940
// Add a cluster facet based on the 'url' facet
939
941
d . addClusterFacet ( 'urlCluster' , 'url' , {
940
- count : Math . log10 ( d . facets . url . length ) ,
942
+ count : Math . log10 ( d . facets . url . length ) ,
941
943
} ) ;
942
944
943
945
const { facets } = d ;
@@ -954,7 +956,7 @@ describe('DataChunks.addClusterFacet()', () => {
954
956
955
957
// Add a cluster facet based on the 'url' facet
956
958
d . addClusterFacet ( 'urlCluster' , 'url' , {
957
- count : Math . log10 ( d . facets . url . length ) ,
959
+ count : Math . log10 ( d . facets . url . length ) ,
958
960
} ) ;
959
961
960
962
const { facets } = d ;
@@ -972,7 +974,7 @@ describe('DataChunks.addClusterFacet()', () => {
972
974
// Add a cluster facet based on the 'url' facet
973
975
const count = Math . floor ( Math . log10 ( 92 ) ) ;
974
976
d . addClusterFacet ( 'urlCluster' , 'url' , {
975
- count,
977
+ count,
976
978
} ) ;
977
979
978
980
// Check if the count is correct
@@ -988,7 +990,7 @@ describe('DataChunks.addClusterFacet()', () => {
988
990
989
991
// Add a cluster facet based on the 'url' facet
990
992
d . addClusterFacet ( 'urlCluster' , 'url' , {
991
- count : Math . log10 ( d . facets . url . length ) ,
993
+ count : Math . log10 ( d . facets . url . length ) ,
992
994
} ) ;
993
995
994
996
const { facets } = d ;
@@ -997,4 +999,4 @@ describe('DataChunks.addClusterFacet()', () => {
997
999
const mostOccurringCluster = facets . urlCluster [ 0 ] ;
998
1000
assert . ok ( mostOccurringCluster . value , '/developer' ) ;
999
1001
} ) ;
1000
- } ) ;
1002
+ } ) ;
0 commit comments