File tree 1 file changed +5
-3
lines changed 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
import { join } from 'path' ;
2
+ import { readdirSync } from 'fs' ;
2
3
import { expectFileToExist , expectFileToMatch } from '../../utils/fs' ;
3
4
import { ng } from '../../utils/process' ;
4
5
import { expectGitToBeClean } from '../../utils/git' ;
@@ -13,9 +14,10 @@ export default function() {
13
14
. then ( ( ) => expectFileToMatch ( 'dist/index.html' , / m a i n \. [ 0 - 9 a - f ] { 20 } \. b u n d l e \. j s / ) )
14
15
. 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 / ) )
15
16
// 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
+ } )
19
21
// Check that the process didn't change local files.
20
22
. then ( ( ) => expectGitToBeClean ( ) ) ;
21
23
}
You can’t perform that action at this time.
0 commit comments