File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11import { join } from 'path' ;
2+ import { readdirSync } from 'fs' ;
23import { expectFileToExist , expectFileToMatch } from '../../utils/fs' ;
34import { ng } from '../../utils/process' ;
45import { expectGitToBeClean } from '../../utils/git' ;
@@ -13,9 +14,10 @@ export default function() {
1314 . then ( ( ) => expectFileToMatch ( 'dist/index.html' , / m a i n \. [ 0 - 9 a - f ] { 20 } \. b u n d l e \. j s / ) )
1415 . then ( ( ) => expectFileToMatch ( 'dist/index.html' , / s t y l e s \. [ 0 - 9 a - f ] { 20 } \. b u n d l e \. c s s / ) )
1516 // Defaults to AoT
16- . then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' ,
17- / b o o t s t r a p M o d u l e F a c t o r y .* \/ \* A p p M o d u l e N g F a c t o r y \* \/ / ) )
18-
17+ . then ( ( ) => {
18+ const main = readdirSync ( './dist' ) . find ( name => ! ! name . match ( / m a i n .[ a - z 0 - 9 ] + \. b u n d l e \. j s / ) ) ;
19+ expectFileToMatch ( `dist/${ main } ` , / b o o t s t r a p M o d u l e F a c t o r y .* \/ \* A p p M o d u l e N g F a c t o r y \* \/ / ) ;
20+ } )
1921 // Check that the process didn't change local files.
2022 . then ( ( ) => expectGitToBeClean ( ) ) ;
2123}
You can’t perform that action at this time.
0 commit comments