chore(install+test): single cmd to full install/test & test JS w/o Dart
* `npm install` now does a full install; auxiliary installation steps have been integrated into the `postinstall` script. * Updated developer docs `DEVELOPER.md` accordingly; also added instructions to dev docs for performing full tests (via `npm test`) -- same as those run on Travis. * Reorg in tests so that JS tests can run without a Dart env. Partly fixes #945 **under the assumption that when running JS tests locally, `ChromeCanary` is the desired browser to use**. Note that CI tests (Travis) still uses `DartiumWithWebPlatform` across the board (Maybe because ChromeCanary isn't being installed?) Fixes #1012. Closes #1010
This commit is contained in:
committed by
Misko Hevery
parent
bd48c927d0
commit
83402930f2
@@ -1,4 +1,4 @@
|
||||
#!/bin/false
|
||||
#!/bin/bash
|
||||
set -e -o pipefail
|
||||
|
||||
if [[ -z $ENV_SET ]]; then
|
||||
@@ -95,4 +95,4 @@ if [[ -z $ENV_SET ]]; then
|
||||
echo NGDART_SCRIPT_DIR=$NGDART_SCRIPT_DIR
|
||||
$DART --version 2>&1
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -4,8 +4,9 @@ set -e
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
${SCRIPT_DIR}/test_unit_dart.sh
|
||||
./node_modules/.bin/gulp test.js --browsers=$KARMA_BROWSERS
|
||||
${SCRIPT_DIR}/test_server_dart.sh
|
||||
${SCRIPT_DIR}/test_e2e_dart.sh
|
||||
|
||||
@@ -4,7 +4,6 @@ set -e
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
./node_modules/.bin/webdriver-manager update
|
||||
|
||||
@@ -4,7 +4,6 @@ set -e
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
./node_modules/.bin/webdriver-manager update
|
||||
@@ -21,4 +20,10 @@ trap killServer EXIT
|
||||
# wait for server to come up!
|
||||
sleep 10
|
||||
|
||||
./node_modules/.bin/protractor protractor-js.conf.js --browsers=${E2E_BROWSERS:-Dartium}
|
||||
# Let protractor use default browser unless one is specified.
|
||||
OPTIONS="";
|
||||
if [[ -n "$E2E_BROWSERS" ]]; then
|
||||
OPTIONS="--browsers=$E2E_BROWSERS";
|
||||
fi
|
||||
|
||||
./node_modules/.bin/protractor protractor-js.conf.js $OPTIONS
|
||||
|
||||
@@ -6,6 +6,11 @@ echo ===========================================================================
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
${SCRIPT_DIR}/test_unit_js.sh
|
||||
# ${SCRIPT_DIR}/test_server_js.sh # JS doesn't yet have server tests
|
||||
# Issue #945 Travis still uses Dartium, and hence needs the env setup.
|
||||
# For local tests, when a developer doesn't have Dart, don't source env_dart.sh
|
||||
if ${SCRIPT_DIR}/env_dart.sh 2>&1 > /dev/null ; then
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
fi
|
||||
|
||||
./node_modules/.bin/gulp test.js --browsers=${KARMA_BROWSERS:-ChromeCanary}
|
||||
${SCRIPT_DIR}/test_e2e_js.sh
|
||||
|
||||
@@ -4,7 +4,6 @@ set -e
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
./node_modules/.bin/webdriver-manager update
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
./node_modules/.bin/gulp test.transpiler.unittest
|
||||
./node_modules/.bin/gulp test.unit.dart/ci --browsers=$KARMA_BROWSERS
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
source $SCRIPT_DIR/env_dart.sh
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
./node_modules/.bin/gulp test.transpiler.unittest
|
||||
./node_modules/.bin/gulp docs/test
|
||||
./node_modules/.bin/gulp test.unit.js/ci --browsers=$KARMA_BROWSERS
|
||||
./node_modules/.bin/gulp test.unit.cjs/ci
|
||||
Reference in New Issue
Block a user