@@ -36,20 +36,21 @@ export default function () {
36
36
`url\('\/assets\/global-img-absolute\.svg'\)` ) )
37
37
. then ( ( ) => expectFileToMatch ( 'dist/styles.bundle.css' , 'url\(global-img-relative.svg\)' ) )
38
38
. then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' ,
39
- `url\('\/assets\/component-img-absolute\.svg'\)` ) )
40
- . then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' , 'background: url\(" \+ __webpack_require ' ) )
39
+ `url\(\\ '\/assets\/component-img-absolute\.svg\\ '\)` ) )
40
+ . then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' , 'url\(component-img-relative\.svg\) ' ) )
41
41
// Check files are correctly created.
42
- . then ( ( ) => expectToFail ( ( ) => expectFileToExist ( 'global-img-absolute.svg' ) ) )
43
- . then ( ( ) => expectFileToExist ( 'global-img-relative.svg' ) )
44
- . then ( ( ) => expectToFail ( ( ) => expectFileToExist ( 'component-img-absolute.svg' ) ) )
45
- . then ( ( ) => expectFileToExist ( 'component-img-relative.svg' ) )
42
+ . then ( ( ) => expectToFail ( ( ) => expectFileToExist ( 'dist/ global-img-absolute.svg' ) ) )
43
+ . then ( ( ) => expectFileToExist ( 'dist/ global-img-relative.svg' ) )
44
+ . then ( ( ) => expectToFail ( ( ) => expectFileToExist ( 'dist/ component-img-absolute.svg' ) ) )
45
+ . then ( ( ) => expectFileToExist ( 'dist/ component-img-relative.svg' ) )
46
46
// Also check with base-href and deploy-url flags.
47
- . then ( ( ) => ng ( 'build' , '--base-href=/base/' , '--deploy-url=/deploy/' , '--extract-css' ) )
47
+ . then ( ( ) => ng ( 'build' , '--base-href=/base/' , '--deploy-url=deploy/' ,
48
+ '--extract-css' , '--aot' ) )
48
49
. then ( ( ) => expectFileToMatch ( 'dist/styles.bundle.css' ,
49
50
`url\('\/base\/deploy\/assets\/global-img-absolute\.svg'\)` ) )
50
51
. then ( ( ) => expectFileToMatch ( 'dist/styles.bundle.css' , 'url\(global-img-relative.svg\)' ) )
51
52
. then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' ,
52
- `url\('\/base\/deploy\/assets\/component-img-absolute\.svg'\)` ) )
53
+ `url\(\\ '\/base\/deploy\/assets\/component-img-absolute\.svg\\ '\)` ) )
53
54
. then ( ( ) => expectFileToMatch ( 'dist/main.bundle.js' ,
54
- 'background: url\(" \+ __webpack_require ' ) ) ;
55
+ 'url\(deploy/component-img-relative\.svg\) ' ) ) ;
55
56
}
0 commit comments