@@ -442,45 +442,43 @@ describe('<Preferences />', () => {
442442 ) ;
443443 } ) ;
444444 } ) ;
445+ describe ( 'start wordwrap at false' , ( ) => {
446+ it ( 'wordwrap toggle, starting at false' , ( ) => {
447+ // render the component with wordwrap prop set to false
448+ subject ( { wordwrap : false } ) ;
445449
446- describe ( 'start linewrap at false' , ( ) => {
447- it ( 'linewrap toggle, starting at false' , ( ) => {
448- // render the component with linewrap prop set to false
449- subject ( { linewrap : false } ) ;
450-
451- // get ahold of the radio buttons for toggling linewrap
452- const linewrapRadioFalse = screen . getByRole ( 'radio' , {
453- name : / l i n e w r a p o f f / i
450+ // get ahold of the radio buttons for toggling wordwrap
451+ const wordwrapRadioFalse = screen . getByRole ( 'radio' , {
452+ name : / w o r d w r a p o f f / i
454453 } ) ;
455- const linewrapRadioTrue = screen . getByRole ( 'radio' , {
456- name : / l i n e w r a p o n / i
454+ const wordwrapRadioTrue = screen . getByRole ( 'radio' , {
455+ name : / w o r d w r a p o n / i
457456 } ) ;
458457
459458 testToggle (
460- linewrapRadioFalse ,
461- linewrapRadioTrue ,
459+ wordwrapRadioFalse ,
460+ wordwrapRadioTrue ,
462461 props . setLinewrap ,
463462 true
464463 ) ;
465464 } ) ;
466465 } ) ;
466+ describe ( 'start wordwrap at true' , ( ) => {
467+ it ( 'wordwrap toggle, starting at true' , ( ) => {
468+ // render the component with wordwrap prop set to true
469+ subject ( { wordwrap : true } ) ;
467470
468- describe ( 'start linewrap at true' , ( ) => {
469- it ( 'linewrap toggle, starting at true' , ( ) => {
470- // render the component with linewrap prop set to false
471- subject ( { linewrap : true } ) ;
472-
473- // get ahold of the radio buttons for toggling linewrap
474- const linewrapRadioFalse = screen . getByRole ( 'radio' , {
475- name : / l i n e w r a p o f f / i
471+ // get ahold of the radio buttons for toggling wordwrap
472+ const wordwrapRadioFalse = screen . getByRole ( 'radio' , {
473+ name : / w o r d w r a p o f f / i
476474 } ) ;
477- const linewrapRadioTrue = screen . getByRole ( 'radio' , {
478- name : / l i n e w r a p o n / i
475+ const wordwrapRadioTrue = screen . getByRole ( 'radio' , {
476+ name : / w o r d w r a p o n / i
479477 } ) ;
480478
481479 testToggle (
482- linewrapRadioTrue ,
483- linewrapRadioFalse ,
480+ wordwrapRadioTrue ,
481+ wordwrapRadioFalse ,
484482 props . setLinewrap ,
485483 false
486484 ) ;
@@ -513,7 +511,7 @@ describe('<Preferences />', () => {
513511 } ) ;
514512
515513 const generalElement1 = screen . getByRole ( 'radio' , {
516- name : / l i n e w r a p o n / i
514+ name : / w o r d w r a p o n / i
517515 } ) ;
518516 expect ( generalElement1 ) . toBeInTheDocument ( ) ;
519517 } ) ;
0 commit comments