-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(@angular/cli): improve unit test performance #6160
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
This is the execution context. | ||
Loaded within the iframe. | ||
Reloaded before every execution run. | ||
--> | ||
<html> | ||
|
||
<head> | ||
<title></title> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> | ||
</head> | ||
|
||
<body> | ||
<!-- The scripts need to be in the body DOM element, as some test running frameworks need the body | ||
to have already been created so they can insert their magic into it. For example, if loaded | ||
before body, Angular Scenario test framework fails to find the body and crashes and burns in | ||
an epic manner. --> | ||
<script src="context.js"></script> | ||
<script type="text/javascript"> | ||
// Configure our Karma and set up bindings | ||
%CLIENT_CONFIG% | ||
window.__karma__.setupContext(window); | ||
|
||
// All served files with the latest timestamps | ||
%MAPPINGS% | ||
</script> | ||
<script type="text/javascript" src="_karma_webpack_/inline.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="_karma_webpack_/polyfills.bundle.js" crossorigin="anonymous"></script> | ||
<!-- Dynamically replaced with <script> tags --> | ||
%SCRIPTS% | ||
<script type="text/javascript" src="_karma_webpack_/scripts.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="_karma_webpack_/vendor.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="_karma_webpack_/main.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript"> | ||
window.__karma__.loaded(); | ||
</script> | ||
</body> | ||
|
||
</html> |
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 |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<!doctype html> | ||
<!-- | ||
This file is almost the same as context.html - loads all source files, | ||
but its purpose is to be loaded in the main frame (not within an iframe), | ||
just for immediate execution, without reporting to Karma server. | ||
--> | ||
<html> | ||
|
||
<head> | ||
%X_UA_COMPATIBLE% | ||
<title>Karma DEBUG RUNNER</title> | ||
<link href="favicon.ico" rel="icon" type="image/x-icon" /> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" /> | ||
</head> | ||
|
||
<body> | ||
<!-- The scripts need to be at the end of body, so that some test running frameworks | ||
(Angular Scenario, for example) need the body to be loaded so that it can insert its magic | ||
into it. If it is before body, then it fails to find the body and crashes and burns in an epic | ||
manner. --> | ||
<script src="context.js"></script> | ||
<script src="debug.js"></script> | ||
<script type="text/javascript"> | ||
// Configure our Karma | ||
%CLIENT_CONFIG% | ||
|
||
// All served files with the latest timestamps | ||
%MAPPINGS% | ||
</script> | ||
<script type="text/javascript" src="_karma_webpack_/inline.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="_karma_webpack_/polyfills.bundle.js" crossorigin="anonymous"></script> | ||
<!-- Dynamically replaced with <script> tags --> | ||
%SCRIPTS% | ||
<script type="text/javascript" src="_karma_webpack_/scripts.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="_karma_webpack_/vendor.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript" src="_karma_webpack_/main.bundle.js" crossorigin="anonymous"></script> | ||
<script type="text/javascript"> | ||
window.__karma__.loaded(); | ||
</script> | ||
</body> | ||
|
||
</html> |
20 changes: 0 additions & 20 deletions
20
packages/@angular/cli/plugins/karma-webpack-emitless-error.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For projects using those, is this PR still working (even if it has the pre-PR performance hit)? Do we need to regenerate projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to regenerate projects.
tests/e2e/tests/test/test-backwards-compat.ts
tests that the old config works.The new plugin has some logic that removes these entries if they are present in the karma config, that ensures backwards compatibility.