@@ -539,32 +539,29 @@ class HiddenModule {
539
539
} ) ;
540
540
afterEach ( ( ) => { expect ( called ) . toBe ( true ) ; } ) ;
541
541
542
- fixmeIvy ( 'to investigate' ) &&
543
- it ( 'using long form should work' , async ( ( ) => {
544
- const platform =
545
- platformDynamicServer ( [ { provide : INITIAL_CONFIG , useValue : { document : doc } } ] ) ;
546
-
547
- platform . bootstrapModule ( AsyncServerModule )
548
- . then ( ( moduleRef ) => {
549
- const applicationRef : ApplicationRef = moduleRef . injector . get ( ApplicationRef ) ;
550
- return applicationRef . isStable . pipe ( first ( ( isStable : boolean ) => isStable ) )
551
- . toPromise ( ) ;
552
- } )
553
- . then ( ( b ) => {
554
- expect ( platform . injector . get ( PlatformState ) . renderToString ( ) )
555
- . toBe ( expectedOutput ) ;
556
- platform . destroy ( ) ;
557
- called = true ;
558
- } ) ;
559
- } ) ) ;
560
-
561
- fixmeIvy ( 'to investigate' ) &&
562
- it ( 'using renderModule should work' , async ( ( ) => {
563
- renderModule ( AsyncServerModule , { document : doc } ) . then ( output => {
564
- expect ( output ) . toBe ( expectedOutput ) ;
542
+ it ( 'using long form should work' , async ( ( ) => {
543
+ const platform =
544
+ platformDynamicServer ( [ { provide : INITIAL_CONFIG , useValue : { document : doc } } ] ) ;
545
+
546
+ platform . bootstrapModule ( AsyncServerModule )
547
+ . then ( ( moduleRef ) => {
548
+ const applicationRef : ApplicationRef = moduleRef . injector . get ( ApplicationRef ) ;
549
+ return applicationRef . isStable . pipe ( first ( ( isStable : boolean ) => isStable ) )
550
+ . toPromise ( ) ;
551
+ } )
552
+ . then ( ( b ) => {
553
+ expect ( platform . injector . get ( PlatformState ) . renderToString ( ) ) . toBe ( expectedOutput ) ;
554
+ platform . destroy ( ) ;
565
555
called = true ;
566
556
} ) ;
567
- } ) ) ;
557
+ } ) ) ;
558
+
559
+ it ( 'using renderModule should work' , async ( ( ) => {
560
+ renderModule ( AsyncServerModule , { document : doc } ) . then ( output => {
561
+ expect ( output ) . toBe ( expectedOutput ) ;
562
+ called = true ;
563
+ } ) ;
564
+ } ) ) ;
568
565
569
566
it ( 'using renderModuleFactory should work' ,
570
567
async ( inject ( [ PlatformRef ] , ( defaultPlatform : PlatformRef ) => {
@@ -609,14 +606,13 @@ class HiddenModule {
609
606
} ) ) ;
610
607
611
608
612
- fixmeIvy ( 'to investigate' ) &&
613
- it ( 'sets a prefix for the _nghost and _ngcontent attributes' , async ( ( ) => {
614
- renderModule ( ExampleStylesModule , { document : doc } ) . then ( output => {
615
- expect ( output ) . toMatch (
616
- / < h t m l > < h e a d > < s t y l e n g - t r a n s i t i o n = " e x a m p l e - s t y l e s " > d i v \[ _ n g c o n t e n t - s c \d + \] { color: b l u e ; } \[ _ n g h o s t - s c \d + \] { c o l o r : r e d ; } < \/ s t y l e > < \/ h e a d > < b o d y > < a p p _ n g h o s t - s c \d + = " " n g - v e r s i o n = " 0 .0 .0 - P L A C E H O L D E R " > < d i v _ n g c o n t e n t - s c \d + = " " > W o r k s ! < \/ d i v > < \/ a p p > < \/ b o d y > < \/ h t m l > / ) ;
617
- called = true ;
618
- } ) ;
619
- } ) ) ;
609
+ it ( 'sets a prefix for the _nghost and _ngcontent attributes' , async ( ( ) => {
610
+ renderModule ( ExampleStylesModule , { document : doc } ) . then ( output => {
611
+ expect ( output ) . toMatch (
612
+ / < h t m l > < h e a d > < s t y l e n g - t r a n s i t i o n = " e x a m p l e - s t y l e s " > d i v \[ _ n g c o n t e n t - s c \d + \] { color: b l u e ; } \[ _ n g h o s t - s c \d + \] { c o l o r : r e d ; } < \/ s t y l e > < \/ h e a d > < b o d y > < a p p _ n g h o s t - s c \d + = " " n g - v e r s i o n = " 0 .0 .0 - P L A C E H O L D E R " > < d i v _ n g c o n t e n t - s c \d + = " " > W o r k s ! < \/ d i v > < \/ a p p > < \/ b o d y > < \/ h t m l > / ) ;
613
+ called = true ;
614
+ } ) ;
615
+ } ) ) ;
620
616
621
617
fixmeIvy ( 'to investigate' ) &&
622
618
it ( 'should handle false values on attributes' , async ( ( ) => {
@@ -662,29 +658,27 @@ class HiddenModule {
662
658
} ) ;
663
659
} ) ) ;
664
660
665
- fixmeIvy ( 'to investigate' ) &&
666
- it ( 'should call render hook' , async ( ( ) => {
667
- renderModule ( RenderHookModule , { document : doc } ) . then ( output => {
668
- // title should be added by the render hook.
669
- expect ( output ) . toBe (
670
- '<html><head><title>RenderHook</title></head><body>' +
671
- '<app ng-version="0.0.0-PLACEHOLDER">Works!</app></body></html>' ) ;
672
- called = true ;
673
- } ) ;
674
- } ) ) ;
661
+ it ( 'should call render hook' , async ( ( ) => {
662
+ renderModule ( RenderHookModule , { document : doc } ) . then ( output => {
663
+ // title should be added by the render hook.
664
+ expect ( output ) . toBe (
665
+ '<html><head><title>RenderHook</title></head><body>' +
666
+ '<app ng-version="0.0.0-PLACEHOLDER">Works!</app></body></html>' ) ;
667
+ called = true ;
668
+ } ) ;
669
+ } ) ) ;
675
670
676
- fixmeIvy ( 'to investigate' ) &&
677
- it ( 'should call multiple render hooks' , async ( ( ) => {
678
- const consoleSpy = spyOn ( console , 'warn' ) ;
679
- renderModule ( MultiRenderHookModule , { document : doc } ) . then ( output => {
680
- // title should be added by the render hook.
681
- expect ( output ) . toBe (
682
- '<html><head><title>RenderHook</title><meta name="description"></head>' +
683
- '<body><app ng-version="0.0.0-PLACEHOLDER">Works!</app></body></html>' ) ;
684
- expect ( consoleSpy ) . toHaveBeenCalled ( ) ;
685
- called = true ;
686
- } ) ;
687
- } ) ) ;
671
+ it ( 'should call multiple render hooks' , async ( ( ) => {
672
+ const consoleSpy = spyOn ( console , 'warn' ) ;
673
+ renderModule ( MultiRenderHookModule , { document : doc } ) . then ( output => {
674
+ // title should be added by the render hook.
675
+ expect ( output ) . toBe (
676
+ '<html><head><title>RenderHook</title><meta name="description"></head>' +
677
+ '<body><app ng-version="0.0.0-PLACEHOLDER">Works!</app></body></html>' ) ;
678
+ expect ( consoleSpy ) . toHaveBeenCalled ( ) ;
679
+ called = true ;
680
+ } ) ;
681
+ } ) ) ;
688
682
} ) ;
689
683
690
684
describe ( 'http' , ( ) => {
@@ -856,13 +850,12 @@ class HiddenModule {
856
850
beforeEach ( ( ) => { called = false ; } ) ;
857
851
afterEach ( ( ) => { expect ( called ) . toBe ( true ) ; } ) ;
858
852
859
- fixmeIvy ( 'to investigate' ) &&
860
- it ( 'adds transfer script tag when using renderModule' , async ( ( ) => {
861
- renderModule ( TransferStoreModule , { document : '<app></app>' } ) . then ( output => {
862
- expect ( output ) . toBe ( defaultExpectedOutput ) ;
863
- called = true ;
864
- } ) ;
865
- } ) ) ;
853
+ it ( 'adds transfer script tag when using renderModule' , async ( ( ) => {
854
+ renderModule ( TransferStoreModule , { document : '<app></app>' } ) . then ( output => {
855
+ expect ( output ) . toBe ( defaultExpectedOutput ) ;
856
+ called = true ;
857
+ } ) ;
858
+ } ) ) ;
866
859
867
860
it ( 'adds transfer script tag when using renderModuleFactory' ,
868
861
async ( inject ( [ PlatformRef ] , ( defaultPlatform : PlatformRef ) => {
@@ -876,19 +869,18 @@ class HiddenModule {
876
869
} ) ;
877
870
} ) ) ) ;
878
871
879
- fixmeIvy ( 'to investigate' ) &&
880
- it ( 'cannot break out of <script> tag in serialized output' , async ( ( ) => {
881
- renderModule ( EscapedTransferStoreModule , {
882
- document : '<esc-app></esc-app>'
883
- } ) . then ( output => {
884
- expect ( output ) . toBe (
885
- '<html><head></head><body><esc-app ng-version="0.0.0-PLACEHOLDER">Works!</esc-app>' +
886
- '<script id="transfer-state" type="application/json">' +
887
- '{&q;testString&q;:&q;&l;/script&g;&l;script&g;' +
888
- 'alert(&s;Hello&a;&s; + \\&q;World\\&q;);&q;}</script></body></html>' ) ;
889
- called = true ;
890
- } ) ;
891
- } ) ) ;
872
+ it ( 'cannot break out of <script> tag in serialized output' , async ( ( ) => {
873
+ renderModule ( EscapedTransferStoreModule , {
874
+ document : '<esc-app></esc-app>'
875
+ } ) . then ( output => {
876
+ expect ( output ) . toBe (
877
+ '<html><head></head><body><esc-app ng-version="0.0.0-PLACEHOLDER">Works!</esc-app>' +
878
+ '<script id="transfer-state" type="application/json">' +
879
+ '{&q;testString&q;:&q;&l;/script&g;&l;script&g;' +
880
+ 'alert(&s;Hello&a;&s; + \\&q;World\\&q;);&q;}</script></body></html>' ) ;
881
+ called = true ;
882
+ } ) ;
883
+ } ) ) ;
892
884
} ) ;
893
885
} ) ;
894
886
} ) ( ) ;
0 commit comments