| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | #!/usr/bin/env bash
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | set -ex -o pipefail | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | if [[ ${TRAVIS} && ${CI_MODE} != "js" ]]; then | 
					
						
							|  |  |  |   exit 0; | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo 'travis_fold:start:test.js' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Setup environment | 
					
						
							|  |  |  | cd `dirname $0` | 
					
						
							|  |  |  | source ./env.sh | 
					
						
							|  |  |  | cd ../.. | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-03 09:24:09 -07:00
										 |  |  | echo 'travis_fold:start:test.unit.tools' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Run unit tests in tools | 
					
						
							| 
									
										
										
										
											2016-05-04 20:01:17 -07:00
										 |  |  | node ./dist/tools/tsc-watch/ tools runCmdsOnly | 
					
						
							| 
									
										
										
										
											2016-05-03 09:24:09 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | echo 'travis_fold:end:test.unit.tools' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-01 22:54:19 -07:00
										 |  |  | echo 'travis_fold:start:test.unit.node' | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Run unit tests in node | 
					
						
							| 
									
										
										
										
											2016-05-04 20:01:17 -07:00
										 |  |  | node ./dist/tools/tsc-watch/ node runCmdsOnly | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-01 22:54:19 -07:00
										 |  |  | echo 'travis_fold:end:test.unit.node' | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-27 16:22:16 -07:00
										 |  |  | echo 'travis_fold:start:test.unit.localChrome' | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-06-15 06:58:57 -07:00
										 |  |  | # rebuild to revert files in @angular/compiler/test | 
					
						
							|  |  |  | # TODO(tbosch): remove this and teach karma to serve the right files | 
					
						
							|  |  |  | node dist/tools/@angular/tsc-wrapped/src/main -p modules/tsconfig.json | 
					
						
							| 
									
										
										
										
											2016-05-03 09:24:09 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | # Run unit tests in local chrome | 
					
						
							|  |  |  | if [[ ${TRAVIS} ]]; then | 
					
						
							|  |  |  |   sh -e /etc/init.d/xvfb start | 
					
						
							|  |  |  | fi | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(npm bin)/karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} | 
					
						
							| 
									
										
										
										
											2016-06-21 10:35:42 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | $(npm bin)/karma start ./modules/@angular/router/karma.conf.js --single-run --browsers=${KARMA_JS_BROWSERS} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-05-01 22:54:19 -07:00
										 |  |  | echo 'travis_fold:end:test.unit.localChrome' | 
					
						
							| 
									
										
										
										
											2016-04-28 17:50:03 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | echo 'travis_fold:end:test.js' |