-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): improvments in unit tests
* separate karma shim & System config
- Loading branch information
1 parent
523cbc7
commit 38c1098
Showing
3 changed files
with
103 additions
and
101 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// Configure the base path and map the different node packages. | ||
System.config({ | ||
baseURL: '/base', | ||
paths: { | ||
'node:*': 'node_modules/*' | ||
}, | ||
map: { | ||
'rxjs': 'node:rxjs', | ||
'main': 'main.js', | ||
'tslib': 'node:tslib/tslib.js', | ||
|
||
// Angular specific mappings. | ||
'@angular/core': 'node:@angular/core/bundles/core.umd.js', | ||
'@angular/core/testing': 'node:@angular/core/bundles/core-testing.umd.js', | ||
'@angular/common': 'node:@angular/common/bundles/common.umd.js', | ||
'@angular/common/testing': 'node:@angular/common/bundles/common-testing.umd.js', | ||
'@angular/common/http': 'node:@angular/common/bundles/common-http.umd.js', | ||
'@angular/common/http/testing': 'node:@angular/common/bundles/common-http-testing.umd.js', | ||
'@angular/compiler': 'node:@angular/compiler/bundles/compiler.umd.js', | ||
'@angular/compiler/testing': 'node:@angular/compiler/bundles/compiler-testing.umd.js', | ||
'@angular/forms': 'node:@angular/forms/bundles/forms.umd.js', | ||
'@angular/forms/testing': 'node:@angular/forms/bundles/forms-testing.umd.js', | ||
'@angular/animations': 'node:@angular/animations/bundles/animations.umd.js', | ||
'@angular/animations/browser': 'node:@angular/animations/bundles/animations-browser.umd.js', | ||
'@angular/platform-browser/animations': | ||
'node:@angular/platform-browser/bundles/platform-browser-animations.umd', | ||
'@angular/platform-browser': | ||
'node:@angular/platform-browser/bundles/platform-browser.umd.js', | ||
'@angular/platform-browser/testing': | ||
'node:@angular/platform-browser/bundles/platform-browser-testing.umd.js', | ||
'@angular/platform-browser-dynamic': | ||
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js', | ||
'@angular/platform-browser-dynamic/testing': | ||
'node:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', | ||
|
||
// Path for local packages. Can be imported inside of tests. | ||
'@ptsecurity/mosaic': 'dist/packages/mosaic/index.js', | ||
|
||
'@ptsecurity/cdk': 'dist/packages/cdk/index.js', | ||
'@ptsecurity/cdk/a11y': 'dist/packages/cdk/a11y/index.js', | ||
'@ptsecurity/cdk/bidi': 'dist/packages/cdk/bidi/index.js', | ||
'@ptsecurity/cdk/coercion': 'dist/packages/cdk/coercion/index.js', | ||
'@ptsecurity/cdk/collections': 'dist/packages/cdk/collections/index.js', | ||
'@ptsecurity/cdk/keycodes': 'dist/packages/cdk/keycodes/index.js', | ||
'@ptsecurity/cdk/layout': 'dist/packages/cdk/layout/index.js', | ||
'@ptsecurity/cdk/overlay': 'dist/packages/cdk/overlay/index.js', | ||
'@ptsecurity/cdk/platform': 'dist/packages/cdk/platform/index.js', | ||
'@ptsecurity/cdk/portal': 'dist/packages/cdk/portal/index.js', | ||
'@ptsecurity/cdk/scrolling': 'dist/packages/cdk/scrolling/index.js', | ||
'@ptsecurity/cdk/testing': 'dist/packages/cdk/testing/index.js', | ||
|
||
'@ptsecurity/mosaic/button': 'dist/packages/mosaic/button/index.js', | ||
'@ptsecurity/mosaic/core': 'dist/packages/mosaic/core/index.js', | ||
'@ptsecurity/mosaic/divider': 'dist/packages/mosaic/divider/index.js', | ||
'@ptsecurity/mosaic/list': 'dist/packages/mosaic/list/index.js', | ||
'@ptsecurity/mosaic/progress-bar': 'dist/packages/mosaic/progress-bar/index.js', | ||
'@ptsecurity/mosaic/icon': 'dist/packages/mosaic/icon/index.js', | ||
'@ptsecurity/mosaic/radio': 'dist/packages/mosaic/radio/index.js', | ||
'@ptsecurity/mosaic/checkbox': 'dist/packages/mosaic/checkbox/index.js' | ||
}, | ||
packages: { | ||
// Thirdparty barrels. | ||
'rxjs': {main: 'index'}, | ||
'rxjs/operators': {main: 'index'}, | ||
|
||
// Set the default extension for the root package, because otherwise the demo-app can't | ||
// be built within the production mode. Due to missing file extensions. | ||
'.': { | ||
defaultExtension: 'js' | ||
} | ||
} | ||
}); |
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