Skip to content

Commit

Permalink
feat(test): add test bundle
Browse files Browse the repository at this point in the history
Create a bundle for the test library, TestComponentBuilder,
TestInjector, and DebugElement.

Internal tests use a superset of the bundle.
  • Loading branch information
juliemr committed Jul 10, 2015
1 parent 0ed5dd0 commit 71c65b4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
14 changes: 10 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -888,16 +888,16 @@ 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, {
"*": "dist/js/dev/es6/*.js"
});
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 });
});

Expand Down Expand Up @@ -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']);

Expand Down
2 changes: 2 additions & 0 deletions modules/angular2/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
5 changes: 2 additions & 3 deletions modules/angular2/test_lib.ts
Original file line number Diff line number Diff line change
@@ -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';

0 comments on commit 71c65b4

Please sign in to comment.