2017-06-13 22:58:17 +02:00
|
|
|
#!/bin/bash
|
2018-06-10 02:19:24 +02:00
|
|
|
START_DIR="$(pwd)"
|
2017-11-12 20:57:59 +02:00
|
|
|
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
BUILD_DIR="$ROOT_DIR/tests-build"
|
2017-12-14 02:23:32 +02:00
|
|
|
TEST_FILE="$1"
|
2017-06-13 22:58:17 +02:00
|
|
|
|
2017-11-12 20:57:59 +02:00
|
|
|
rsync -a --exclude "node_modules/" "$ROOT_DIR/tests/" "$BUILD_DIR/"
|
|
|
|
rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/"
|
|
|
|
rsync -a "$ROOT_DIR/build/locales/" "$BUILD_DIR/locales/"
|
|
|
|
mkdir -p "$BUILD_DIR/data"
|
2017-06-13 22:58:17 +02:00
|
|
|
|
2018-05-14 12:36:02 +02:00
|
|
|
if [[ $TEST_FILE != "" ]]; then
|
2017-12-14 02:23:32 +02:00
|
|
|
(cd "$ROOT_DIR" && npm test tests-build/$TEST_FILE.js)
|
2018-05-14 12:36:02 +02:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2018-06-10 02:19:24 +02:00
|
|
|
function finish {
|
|
|
|
cd "$START_DIR"
|
|
|
|
}
|
|
|
|
|
|
|
|
trap finish EXIT
|
|
|
|
|
|
|
|
cd "$ROOT_DIR"
|
|
|
|
npm test tests-build/ArrayUtils.js
|
|
|
|
npm test tests-build/EnexToMd.js
|
|
|
|
npm test tests-build/HtmlToMd.js
|
|
|
|
npm test tests-build/markdownUtils.js
|
2018-10-30 02:17:50 +02:00
|
|
|
npm test tests-build/models_BaseItem.js
|
2018-06-10 02:19:24 +02:00
|
|
|
npm test tests-build/models_Folder.js
|
|
|
|
npm test tests-build/models_Note.js
|
2018-09-06 19:33:21 +02:00
|
|
|
npm test tests-build/models_Tag.js
|
2018-06-10 02:19:24 +02:00
|
|
|
npm test tests-build/models_Setting.js
|
2018-11-20 02:42:21 +02:00
|
|
|
npm test tests-build/pathUtils.js
|
2018-06-10 02:19:24 +02:00
|
|
|
npm test tests-build/services_InteropService.js
|
|
|
|
npm test tests-build/services_ResourceService.js
|
2018-09-28 20:24:57 +02:00
|
|
|
npm test tests-build/urlUtils.js
|
|
|
|
npm test tests-build/encryption.js
|
|
|
|
npm test tests-build/services_rest_Api.js
|
|
|
|
npm test tests-build/synchronizer.js
|