File tree Expand file tree Collapse file tree 2 files changed +39
-1
lines changed
Expand file tree Collapse file tree 2 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ let specSummary = {
1313 "specs" : [ ] ,
1414 "duration" : null
1515}
16- let noWrap = ( process . env . SYNC_NO_WRAP || false ) ;
16+ let noWrap = ( process . env . SYNC_NO_WRAP && ( process . env . SYNC_NO_WRAP === 'true' ) ) ;
1717let terminalWidth = ( process . stdout . columns ) * 0.9 ;
1818let lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
1919// Do not show the separator based on terminal width if no-wrap provided.
Original file line number Diff line number Diff line change @@ -600,6 +600,44 @@ describe('utils', () => {
600600 } ) ;
601601 } ) ;
602602
603+ describe ( 'setNoWrap' , ( ) => {
604+ it ( 'sets the no-wrap to process.env.SYNC_NO_WRAP to true' , ( ) => {
605+ let args = {
606+ noWrap : true
607+ } ;
608+ let bsConfig = {
609+ run_settings : { }
610+ } ;
611+
612+ utils . setNoWrap ( bsConfig , args ) ;
613+ expect ( process . env . SYNC_NO_WRAP ) . to . be . eq ( 'true' ) ;
614+ } ) ;
615+
616+ it ( 'false to not set the no-wrap to process.env.SYNC_NO_WRAP to true' , ( ) => {
617+ let args = {
618+ noWrap : false
619+ } ;
620+ let bsConfig = {
621+ run_settings : { }
622+ } ;
623+
624+ utils . setNoWrap ( bsConfig , args ) ;
625+ expect ( process . env . SYNC_NO_WRAP ) . to . be . eq ( 'false' ) ;
626+ } ) ;
627+
628+ it ( 'string to not set the no-wrap to process.env.SYNC_NO_WRAP to true' , ( ) => {
629+ let args = {
630+ noWrap : "true"
631+ } ;
632+ let bsConfig = {
633+ run_settings : { }
634+ } ;
635+
636+ utils . setNoWrap ( bsConfig , args ) ;
637+ expect ( process . env . SYNC_NO_WRAP ) . to . be . eq ( 'false' ) ;
638+ } ) ;
639+ } ) ;
640+
603641 describe ( 'exportResults' , ( ) => {
604642 it ( 'should export results to log/build_results.txt' , ( ) => {
605643 sinon . stub ( fs , 'writeFileSync' ) . returns ( true ) ;
You can’t perform that action at this time.
0 commit comments