@@ -13,8 +13,7 @@ import { BrowserBuilderOutput } from '../../src/browser';
1313import { createArchitect , host , veEnabled } from '../utils' ;
1414
1515
16- // DISABLED_FOR_IVY These should pass but are currently not supported
17- ( veEnabled ? describe : xdescribe ) ( 'Server Builder' , ( ) => {
16+ describe ( 'Server Builder' , ( ) => {
1817 const target = { project : 'app' , target : 'server' } ;
1918 let architect : Architect ;
2019
@@ -33,7 +32,12 @@ import { createArchitect, host, veEnabled } from '../utils';
3332
3433 const fileName = join ( outputPath , 'main.js' ) ;
3534 const content = virtualFs . fileBufferToString ( host . scopedSync ( ) . read ( normalize ( fileName ) ) ) ;
36- expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e N g F a c t o r y / ) ;
35+
36+ if ( veEnabled ) {
37+ expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e N g F a c t o r y / ) ;
38+ } else {
39+ expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e \. n g M o d u l e D e f / ) ;
40+ }
3741
3842 await run . stop ( ) ;
3943 } ) ;
@@ -68,16 +72,10 @@ import { createArchitect, host, veEnabled } from '../utils';
6872
6973 it ( 'supports sourcemaps' , async ( ) => {
7074 const overrides = { sourceMap : true } ;
71-
7275 const run = await architect . scheduleTarget ( target , overrides ) ;
7376 const output = await run . result as BrowserBuilderOutput ;
7477 expect ( output . success ) . toBe ( true ) ;
75-
76- const fileName = join ( outputPath , 'main.js' ) ;
77- const content = virtualFs . fileBufferToString ( host . scopedSync ( ) . read ( normalize ( fileName ) ) ) ;
78- expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e N g F a c t o r y / ) ;
7978 expect ( host . scopedSync ( ) . exists ( join ( outputPath , 'main.js.map' ) ) ) . toBeTruthy ( ) ;
80-
8179 await run . stop ( ) ;
8280 } ) ;
8381
@@ -144,7 +142,11 @@ import { createArchitect, host, veEnabled } from '../utils';
144142
145143 const fileName = join ( outputPath , 'main.js' ) ;
146144 const content = virtualFs . fileBufferToString ( host . scopedSync ( ) . read ( normalize ( fileName ) ) ) ;
147- expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e N g F a c t o r y / ) ;
145+ if ( veEnabled ) {
146+ expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e N g F a c t o r y / ) ;
147+ } else {
148+ expect ( content ) . toMatch ( / A p p S e r v e r M o d u l e \. n g M o d u l e D e f / ) ;
149+ }
148150 } ) ,
149151 take ( 1 ) ,
150152 ) . toPromise ( ) ;
0 commit comments