-
Notifications
You must be signed in to change notification settings - Fork 12k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: enable build E2E tests for esbuild-based builders
The build E2E tests have now been enabled for the esbuild-based builders. The bundle budget test is currently skipped pending feature implementation. Several redundant tests were also deleted due to the functionality already being covered by unit tests for the builders. (cherry picked from commit 8bd90ff)
- Loading branch information
1 parent
05ce9d6
commit bece843
Showing
22 changed files
with
188 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
import { getGlobalVariable } from '../../utils/env'; | ||
import { expectFileToExist, expectFileToMatch } from '../../utils/fs'; | ||
import { ng } from '../../utils/process'; | ||
import { expectToFail } from '../../utils/utils'; | ||
|
||
export default async function () { | ||
const usingWebpack = !getGlobalVariable('argv')['esbuild']; | ||
|
||
// Licenses should be left intact if extraction is disabled | ||
await ng('build', '--extract-licenses=false', '--output-hashing=none'); | ||
|
||
await expectToFail(() => expectFileToExist('dist/test-project/browser/3rdpartylicenses.txt')); | ||
if (usingWebpack) { | ||
await expectToFail(() => expectFileToExist('dist/test-project/browser/3rdpartylicenses.txt')); | ||
} else { | ||
// Application builder puts the licenses at the output path root | ||
await expectToFail(() => expectFileToExist('dist/test-project/3rdpartylicenses.txt')); | ||
} | ||
await expectFileToMatch('dist/test-project/browser/main.js', '@license'); | ||
|
||
// Licenses should be removed if extraction is enabled | ||
await ng('build', '--extract-licenses', '--output-hashing=none'); | ||
|
||
await expectFileToExist('dist/test-project/browser/3rdpartylicenses.txt'); | ||
if (usingWebpack) { | ||
await expectFileToExist('dist/test-project/browser/3rdpartylicenses.txt'); | ||
} else { | ||
await expectFileToExist('dist/test-project/3rdpartylicenses.txt'); | ||
} | ||
await expectToFail(() => expectFileToMatch('dist/test-project/browser/main.js', '@license')); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.