forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(@angular/cli): improve ng test performance
This PR uses a new Karma plugin to enable vendor bundles in unit tests, increasing rebuild performance. On a medium size project rebuilds times were 15x smaller (16.5s to 0.9s). Fix angular#5423
- Loading branch information
1 parent
6015a03
commit f967a4e
Showing
9 changed files
with
215 additions
and
76 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 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.