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 = {
13
13
"specs" : [ ] ,
14
14
"duration" : null
15
15
}
16
- let noWrap = ( process . env . SYNC_NO_WRAP || false ) ;
16
+ let noWrap = ( process . env . SYNC_NO_WRAP && ( process . env . SYNC_NO_WRAP === 'true' ) ) ;
17
17
let terminalWidth = ( process . stdout . columns ) * 0.9 ;
18
18
let lineSeparator = "\n" + "-" . repeat ( terminalWidth ) ;
19
19
// 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', () => {
600
600
} ) ;
601
601
} ) ;
602
602
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
+
603
641
describe ( 'exportResults' , ( ) => {
604
642
it ( 'should export results to log/build_results.txt' , ( ) => {
605
643
sinon . stub ( fs , 'writeFileSync' ) . returns ( true ) ;
You can’t perform that action at this time.
0 commit comments