@@ -467,6 +467,10 @@ describe('Test axes', function() {
467467 ] ) ;
468468 } ) ;
469469
470+ var warnTxt = ' to avoid either an infinite loop and possibly ' +
471+ 'inconsistent scaleratios, or because the targetaxis has ' +
472+ 'fixed range.' ;
473+
470474 it ( 'breaks scaleanchor loops and drops conflicting ratios' , function ( ) {
471475 var warnings = [ ] ;
472476 spyOn ( Lib , 'warn' ) . and . callFake ( function ( msg ) {
@@ -493,10 +497,6 @@ describe('Test axes', function() {
493497 { x2 : 5 * 7 * 9 , y2 : 7 * 9 , y3 : 1 , x3 : 9 }
494498 ] ) ;
495499
496- var warnTxt = ' to avoid either an infinite loop and possibly ' +
497- 'inconsistent scaleratios, or because the targetaxis has ' +
498- 'fixed range.' ;
499-
500500 expect ( warnings ) . toEqual ( [
501501 'ignored yaxis.scaleanchor: "x"' + warnTxt ,
502502 'ignored yaxis3.scaleanchor: "x2"' + warnTxt
@@ -510,15 +510,15 @@ describe('Test axes', function() {
510510 } ) ;
511511
512512 layoutIn = {
513- xaxis : { scaleanchor : 'x' , scaleratio : 2 } , // can't link to itself
513+ xaxis : { scaleanchor : 'x' , scaleratio : 2 } , // can't link to itself - this one isn't ignored...
514514 yaxis : { scaleanchor : 'x4' , scaleratio : 3 } , // doesn't exist
515515 xaxis2 : { scaleanchor : 'yaxis' , scaleratio : 5 } // must be an id, not a name
516516 } ;
517517
518518 supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
519519
520520 expect ( layoutOut . _axisConstraintGroups ) . toEqual ( [ ] ) ;
521- expect ( warnings ) . toEqual ( [ ] ) ;
521+ expect ( warnings ) . toEqual ( [ 'ignored xaxis.scaleanchor: "x"' + warnTxt ] ) ;
522522
523523 [ 'xaxis' , 'yaxis' , 'xaxis2' ] . forEach ( function ( axName ) {
524524 expect ( layoutOut [ axName ] . scaleanchor ) . toBeUndefined ( axName ) ;
0 commit comments