feat(test): add test bundle

Create a bundle for the test library, TestComponentBuilder,
TestInjector, and DebugElement.

Internal tests use a superset of the bundle.
This commit is contained in:
Julie Ralph 2015-06-26 17:25:49 -07:00
parent 0ed5dd0d7b
commit 71c65b47f9
3 changed files with 14 additions and 7 deletions

View File

@ -888,7 +888,7 @@ gulp.task('router.bundle.js.dev', ['build.js.dev'], function() {
{ sourceMaps: true });
});
gulp.task('mock.bundle.js.dev', ['build.js.dev'], function() {
gulp.task('test.bundle.js.dev', ['build.js.dev'], function() {
var devBundleConfig = merge(true, bundleConfig);
devBundleConfig.paths =
merge(true, devBundleConfig.paths, {
@ -896,8 +896,8 @@ gulp.task('mock.bundle.js.dev', ['build.js.dev'], function() {
});
return bundler.bundle(
devBundleConfig,
'angular2/mock - angular2/angular2',
'./dist/bundle/mock.dev.js',
'angular2/test + angular2/mock - angular2/angular2',
'./dist/bundle/test_lib.dev.js',
{ sourceMaps: true });
});
@ -956,7 +956,13 @@ gulp.task('bundle.js.sfx.dev.deps', ['bundle.js.sfx.dev'], function() {
.pipe(gulp.dest('dist/bundle'));
});
gulp.task('bundle.js.deps', ['bundle.js.prod.deps', 'bundle.js.dev.deps', 'bundle.js.min.deps', 'bundle.js.sfx.dev.deps', 'router.bundle.js.dev', 'mock.bundle.js.dev']);
gulp.task('bundle.js.deps', [
'bundle.js.prod.deps',
'bundle.js.dev.deps',
'bundle.js.min.deps',
'bundle.js.sfx.dev.deps',
'router.bundle.js.dev',
'test.bundle.js.dev']);
gulp.task('build.js', ['build.js.dev', 'build.js.prod', 'build.js.cjs', 'bundle.js.deps', 'benchpress.bundle']);

View File

@ -7,5 +7,7 @@
* This module is not included in the `angular2` module; you must import the test module explicitly.
*
*/
export * from './src/test_lib/test_lib';
export * from './src/test_lib/test_component_builder';
export * from './src/test_lib/test_injector';
export * from './debug';

View File

@ -1,6 +1,5 @@
export * from './src/test_lib/test_lib';
// Test library and utilities for internal use.
export * from './test';
export * from './src/test_lib/spies';
export * from './src/test_lib/utils';
export * from './src/test_lib/fake_async';
export * from './src/test_lib/test_component_builder';
export * from './debug';