@@ -668,9 +668,10 @@ describe('gradients', function() {
668668 }
669669 } ] )
670670 . then ( function ( ) {
671- // Function is called multiple times per point (plot + style phases)
672- // so check that we got at least one call per point
673- expect ( receivedArgs . length ) . toBeGreaterThanOrEqual ( 3 ) ;
671+ // Marker functions are called once per point (3 points = 3 calls).
672+ // With selected.marker.size, selectedPointStyle triggers a second pass (6 calls).
673+ expect ( receivedArgs . length === 3 || receivedArgs . length === 6 ) . toBe ( true ,
674+ 'Expected 3 or 6 calls, got ' + receivedArgs . length ) ;
674675
675676 // Verify r is passed correctly
676677 expect ( typeof receivedArgs [ 0 ] . r ) . toBe ( 'number' ) ;
@@ -707,8 +708,10 @@ describe('gradients', function() {
707708 }
708709 } ] )
709710 . then ( function ( ) {
710- // Function is called multiple times per point (plot + style phases)
711- expect ( receivedData . length ) . toBeGreaterThanOrEqual ( 3 ) ;
711+ // Marker functions are called once per point (3 points = 3 calls).
712+ // With selected.marker.size, selectedPointStyle triggers a second pass (6 calls).
713+ expect ( receivedData . length === 3 || receivedData . length === 6 ) . toBe ( true ,
714+ 'Expected 3 or 6 calls, got ' + receivedData . length ) ;
712715
713716 // Verify all expected customdata types were received
714717 var receivedTypes = receivedData . map ( function ( d ) { return d ? d . type : null ; } ) ;
0 commit comments