Skip to content

Commit 98d654d

Browse files
committed
fix tests
1 parent 0f75bbd commit 98d654d

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

tests/e2e/tests/build/css-urls.ts

+10-9
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,21 @@ export default function () {
3636
`url\('\/assets\/global-img-absolute\.svg'\)`))
3737
.then(() => expectFileToMatch('dist/styles.bundle.css', 'url\(global-img-relative.svg\)'))
3838
.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\)'))
4141
// 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'))
4646
// 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'))
4849
.then(() => expectFileToMatch('dist/styles.bundle.css',
4950
`url\('\/base\/deploy\/assets\/global-img-absolute\.svg'\)`))
5051
.then(() => expectFileToMatch('dist/styles.bundle.css', 'url\(global-img-relative.svg\)'))
5152
.then(() => expectFileToMatch('dist/main.bundle.js',
52-
`url\('\/base\/deploy\/assets\/component-img-absolute\.svg'\)`))
53+
`url\(\\'\/base\/deploy\/assets\/component-img-absolute\.svg\\'\)`))
5354
.then(() => expectFileToMatch('dist/main.bundle.js',
54-
'background: url\(" \+ __webpack_require'));
55+
'url\(deploy/component-img-relative\.svg\)'));
5556
}

0 commit comments

Comments
 (0)