@@ -530,48 +530,72 @@ foo`),
530
530
} ) ;
531
531
532
532
describe ( 'findProcess()' , ( ) => {
533
- it ( 'should be available in main processe only' , ( ) => {
533
+ it ( 'should be available in main process only' , ( ) => {
534
534
var proc = findProcess ( getTokens ( 'Process: [Main](../glossary.md#main-process)' ) ) ;
535
535
expect ( proc . main ) . toEqual ( true ) ;
536
536
expect ( proc . renderer ) . toEqual ( false ) ;
537
+ expect ( proc . utility ) . toEqual ( false ) ;
537
538
} ) ;
538
539
539
- it ( 'should be available in renderer processe only' , ( ) => {
540
+ it ( 'should be available in renderer process only' , ( ) => {
540
541
var proc = findProcess ( getTokens ( 'Process: [Renderer](../glossary.md#renderer-process)' ) ) ;
541
542
expect ( proc . main ) . toEqual ( false ) ;
542
543
expect ( proc . renderer ) . toEqual ( true ) ;
544
+ expect ( proc . utility ) . toEqual ( false ) ;
543
545
} ) ;
544
546
545
- it ( 'should be available in both processes' , ( ) => {
547
+ it ( 'should be available in utility process only' , ( ) => {
548
+ var proc = findProcess ( getTokens ( 'Process: [Utility](../glossary.md#utility-process)' ) ) ;
549
+ expect ( proc . main ) . toEqual ( false ) ;
550
+ expect ( proc . renderer ) . toEqual ( false ) ;
551
+ expect ( proc . utility ) . toEqual ( true ) ;
552
+ } ) ;
553
+
554
+ it ( 'should be available in main and renderer processes' , ( ) => {
546
555
var proc = findProcess (
547
556
getTokens (
548
557
'Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)' ,
549
558
) ,
550
559
) ;
551
560
expect ( proc . main ) . toEqual ( true ) ;
552
561
expect ( proc . renderer ) . toEqual ( true ) ;
562
+ expect ( proc . utility ) . toEqual ( false ) ;
553
563
} ) ;
554
564
555
- it ( 'should be available in both processes' , ( ) => {
565
+ it ( 'should be available in main and renderer processes' , ( ) => {
556
566
var proc = findProcess (
557
567
getTokens (
558
568
'Process: [Renderer](../glossary.md#renderer-process), [Main](../glossary.md#main-process)' ,
559
569
) ,
560
570
) ;
561
571
expect ( proc . main ) . toEqual ( true ) ;
562
572
expect ( proc . renderer ) . toEqual ( true ) ;
573
+ expect ( proc . utility ) . toEqual ( false ) ;
574
+ } ) ;
575
+
576
+ it ( 'should be available in main and utility processes' , ( ) => {
577
+ var proc = findProcess (
578
+ getTokens (
579
+ 'Process: [Main](../glossary.md#main-process), [Utility](../glossary.md#renderer-process)' ,
580
+ ) ,
581
+ ) ;
582
+ expect ( proc . main ) . toEqual ( true ) ;
583
+ expect ( proc . renderer ) . toEqual ( false ) ;
584
+ expect ( proc . utility ) . toEqual ( true ) ;
563
585
} ) ;
564
586
565
- it ( 'should be available in both processes' , ( ) => {
587
+ it ( 'should be available in all processes' , ( ) => {
566
588
var proc = findProcess ( getTokens ( '' ) ) ;
567
589
expect ( proc . main ) . toEqual ( true ) ;
568
590
expect ( proc . renderer ) . toEqual ( true ) ;
591
+ expect ( proc . utility ) . toEqual ( true ) ;
569
592
} ) ;
570
593
571
- it ( 'should be available in both processes' , ( ) => {
594
+ it ( 'should be available in all processes' , ( ) => {
572
595
var proc = findProcess ( [ ] ) ;
573
596
expect ( proc . main ) . toEqual ( true ) ;
574
597
expect ( proc . renderer ) . toEqual ( true ) ;
598
+ expect ( proc . utility ) . toEqual ( true ) ;
575
599
} ) ;
576
600
} ) ;
577
601
0 commit comments