@@ -140,9 +140,9 @@ import 'core-js/es6/set';
140140import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
141141` ;
142142
143- tree . create ( 'testSrc /polyfills.ts' , polyfills ) ;
143+ tree . create ( ` ${ sourceRoot } /polyfills.ts` , polyfills ) ;
144144 runner . runSchematic ( 'ng-add' , { polyfills : true , normalizeCss : false } , tree ) ;
145- expect ( tree . readContent ( 'testSrc /polyfills.ts' ) . replace ( / \r \n / g, '\n' ) ) . toEqual ( result . replace ( / \r \n / g, '\n' ) ) ;
145+ expect ( tree . readContent ( ` ${ sourceRoot } /polyfills.ts` ) . replace ( / \r \n / g, '\n' ) ) . toEqual ( result . replace ( / \r \n / g, '\n' ) ) ;
146146 } ) ;
147147
148148 it ( 'should properly add css reset' , ( ) => {
@@ -204,7 +204,7 @@ import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
204204 * that is built with AngularCLI v7.3 or above. All else are considered below v7.3.
205205 */
206206 it ( 'should enable es5BrowserSupport on projects with ng cli version >= 7.3' , ( ) => {
207- tree . create ( 'testSrc /polyfills.ts' , '' ) ;
207+ tree . create ( ` ${ sourceRoot } /polyfills.ts` , '' ) ;
208208 const newJson : any = JSON . parse ( tree . read ( '/angular.json' ) . toString ( ) ) ;
209209 newJson . projects [ 'testProj' ] . architect . build . options [ 'es5BrowserSupport' ] = false ;
210210 tree . overwrite ( '/angular.json' , JSON . stringify ( newJson ) ) ;
@@ -228,11 +228,11 @@ import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
228228import 'web-animations-js'; // Run \`npm install --save web-animations-js\`.
229229 ` ;
230230
231- tree . create ( 'testSrc /polyfills.ts' , polyfills ) ;
231+ tree . create ( ` ${ sourceRoot } /polyfills.ts` , polyfills ) ;
232232 const newJson : any = JSON . parse ( tree . read ( '/angular.json' ) . toString ( ) ) ;
233233 newJson . projects [ 'testProj' ] . architect . build . options [ 'es5BrowserSupport' ] = false ;
234234 tree . overwrite ( '/angular.json' , JSON . stringify ( newJson ) ) ;
235235 runner . runSchematic ( 'ng-add' , { polyfills : true } , tree ) ;
236- expect ( tree . readContent ( 'testSrc /polyfills.ts' ) . replace ( / \r \n / g, '\n' ) ) . toEqual ( result . replace ( / \r \n / g, '\n' ) ) ;
236+ expect ( tree . readContent ( ` ${ sourceRoot } /polyfills.ts` ) . replace ( / \r \n / g, '\n' ) ) . toEqual ( result . replace ( / \r \n / g, '\n' ) ) ;
237237 } ) ;
238238} ) ;
0 commit comments