chore(test): make it easier to run all JS and Dart tests
Performed a slight refactoring of CI scripts to make it easier for developers to run the **same** tests as those run on Travis. Defined `npm` scripts `test-js` and `test-dart`. `npm test` now runs the whole lot. Closes #966
This commit is contained in:

committed by
Misko Hevery

parent
59a1f836a2
commit
452a724542
@ -9,8 +9,4 @@ SCRIPT_DIR=$(dirname $0)
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
${SCRIPT_DIR}/build_$MODE.sh
|
||||
${SCRIPT_DIR}/test_unit_$MODE.sh
|
||||
if [ "$MODE" == "dart" ]; then # JS doesn't yet have server tests
|
||||
${SCRIPT_DIR}/test_server_$MODE.sh
|
||||
fi
|
||||
${SCRIPT_DIR}/test_e2e_$MODE.sh
|
||||
${SCRIPT_DIR}/test_$MODE.sh
|
||||
|
11
scripts/ci/test_dart.sh
Executable file
11
scripts/ci/test_dart.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
SCRIPT_DIR=$(dirname $0)
|
||||
cd $SCRIPT_DIR/../..
|
||||
|
||||
${SCRIPT_DIR}/test_unit_dart.sh
|
||||
${SCRIPT_DIR}/test_server_dart.sh
|
||||
${SCRIPT_DIR}/test_e2e_dart.sh
|
@ -21,4 +21,4 @@ trap killServer EXIT
|
||||
# wait for server to come up!
|
||||
sleep 10
|
||||
|
||||
./node_modules/.bin/protractor protractor-dart2js.conf.js --browsers=$E2E_BROWSERS
|
||||
./node_modules/.bin/protractor protractor-dart2js.conf.js --browsers=${E2E_BROWSERS:-Dartium}
|
||||
|
@ -21,4 +21,4 @@ trap killServer EXIT
|
||||
# wait for server to come up!
|
||||
sleep 10
|
||||
|
||||
./node_modules/.bin/protractor protractor-js.conf.js --browsers=$E2E_BROWSERS
|
||||
./node_modules/.bin/protractor protractor-js.conf.js --browsers=${E2E_BROWSERS:-Dartium}
|
||||
|
11
scripts/ci/test_js.sh
Executable file
11
scripts/ci/test_js.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo =============================================================================
|
||||
# go to project dir
|
||||
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
|
||||
${SCRIPT_DIR}/test_e2e_js.sh
|
Reference in New Issue
Block a user