test: execute router tests on .`/test.sh browser` (#10053)

This commit is contained in:
Victor Berchet 2016-07-21 16:12:40 -07:00 committed by GitHub
parent a441b5b8fe
commit 31a7709ece
4 changed files with 19 additions and 6 deletions

View File

@ -38,6 +38,7 @@ module.exports = function(config) {
exclude: [ exclude: [
'dist/all/@angular/**/e2e_test/**', 'dist/all/@angular/**/e2e_test/**',
'dist/all/@angular/examples/**', 'dist/all/@angular/examples/**',
'dist/all/@angular/router/**',
'dist/all/@angular/compiler-cli/**', 'dist/all/@angular/compiler-cli/**',
'dist/all/angular1_router.js', 'dist/all/angular1_router.js',
'dist/all/@angular/platform-browser/testing/e2e_util.js' 'dist/all/@angular/platform-browser/testing/e2e_util.js'

View File

@ -77,5 +77,5 @@ module.exports = function(config) {
autoWatch: true, autoWatch: true,
browsers: ['Chrome'], browsers: ['Chrome'],
singleRun: false singleRun: false
}) });
}; };

View File

@ -30,7 +30,6 @@
"rollup-test", "rollup-test",
"upgrade-ts2dart.d.ts", "upgrade-ts2dart.d.ts",
"zone-ts2dart.d.ts", "zone-ts2dart.d.ts",
"@angular/compiler-cli/integrationtest", "@angular/compiler-cli/integrationtest"
"@angular/router"
] ]
} }

View File

@ -79,9 +79,20 @@ if (platform == 'node') {
start: 'File change detected. Starting incremental compilation...', start: 'File change detected. Starting incremental compilation...',
error: 'error', error: 'error',
complete: 'Compilation complete. Watching for file changes.', complete: 'Compilation complete. Watching for file changes.',
onStartCmds: onStartCmds: [
[['node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', 'karma-js.conf.js']], [
onChangeCmds: [['node', 'node_modules/karma/bin/karma', 'run', 'karma-js.conf.js']] 'node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', '--port=9876',
'karma-js.conf.js'
],
[
'node', 'node_modules/karma/bin/karma', 'start', '--no-auto-watch', '--port=9877',
'modules/@angular/router/karma.conf.js'
],
],
onChangeCmds: [
['node', 'node_modules/karma/bin/karma', 'run', 'karma-js.conf.js', '--port=9876'],
['node', 'node_modules/karma/bin/karma', 'run', '--port=9877'],
]
}); });
} else if (platform == 'tools') { } else if (platform == 'tools') {
tscWatch = new TscWatch({ tscWatch = new TscWatch({
@ -93,6 +104,8 @@ if (platform == 'node') {
'node', 'dist/tools/cjs-jasmine/index-tools', '--', '@angular/tsc-wrapped/**/*{_,.}spec.js' 'node', 'dist/tools/cjs-jasmine/index-tools', '--', '@angular/tsc-wrapped/**/*{_,.}spec.js'
]] ]]
}); });
} else {
throw new Error(`unknown platform: ${platform}`);
} }
if (runMode === 'watch') { if (runMode === 'watch') {