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:
parent
0ed5dd0d7b
commit
71c65b47f9
14
gulpfile.js
14
gulpfile.js
@ -888,7 +888,7 @@ gulp.task('router.bundle.js.dev', ['build.js.dev'], function() {
|
|||||||
{ sourceMaps: true });
|
{ 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);
|
var devBundleConfig = merge(true, bundleConfig);
|
||||||
devBundleConfig.paths =
|
devBundleConfig.paths =
|
||||||
merge(true, devBundleConfig.paths, {
|
merge(true, devBundleConfig.paths, {
|
||||||
@ -896,8 +896,8 @@ gulp.task('mock.bundle.js.dev', ['build.js.dev'], function() {
|
|||||||
});
|
});
|
||||||
return bundler.bundle(
|
return bundler.bundle(
|
||||||
devBundleConfig,
|
devBundleConfig,
|
||||||
'angular2/mock - angular2/angular2',
|
'angular2/test + angular2/mock - angular2/angular2',
|
||||||
'./dist/bundle/mock.dev.js',
|
'./dist/bundle/test_lib.dev.js',
|
||||||
{ sourceMaps: true });
|
{ sourceMaps: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -956,7 +956,13 @@ gulp.task('bundle.js.sfx.dev.deps', ['bundle.js.sfx.dev'], function() {
|
|||||||
.pipe(gulp.dest('dist/bundle'));
|
.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']);
|
gulp.task('build.js', ['build.js.dev', 'build.js.prod', 'build.js.cjs', 'bundle.js.deps', 'benchpress.bundle']);
|
||||||
|
|
||||||
|
@ -7,5 +7,7 @@
|
|||||||
* This module is not included in the `angular2` module; you must import the test module explicitly.
|
* 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_component_builder';
|
||||||
export * from './src/test_lib/test_injector';
|
export * from './src/test_lib/test_injector';
|
||||||
|
export * from './debug';
|
||||||
|
@ -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/spies';
|
||||||
export * from './src/test_lib/utils';
|
export * from './src/test_lib/utils';
|
||||||
export * from './src/test_lib/fake_async';
|
export * from './src/test_lib/fake_async';
|
||||||
export * from './src/test_lib/test_component_builder';
|
|
||||||
export * from './debug';
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user