fix(common/lmlayer): problem was with lm-layer npm run test

This commit is contained in:
jahorton 2020-04-27 13:21:03 +07:00
parent a5d3e89029
commit 42ea45a97f
2 changed files with 7 additions and 5 deletions

View file

@ -5,7 +5,7 @@
"main": "build/index.js",
"scripts": {
"karma": "karma",
"lerna": "cd ../ && npm run lerna --",
"lerna": "cd ../.. && npm run lerna --",
"mocha": "mocha",
"test": "bash ./unit_tests/test.sh",
"tsc": "tsc"

View file

@ -1,10 +1,12 @@
#! /bin/bash
# We should work within the script's directory, not the one we were called in.
cd $(dirname "$BASH_SOURCE")
THIS_SCRIPT="$(greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null || readlink -f "${BASH_SOURCE[0]}")"
. "$(dirname "$THIS_SCRIPT")/../../../resources/build/build-utils.sh"
## END STANDARD BUILD SCRIPT INCLUDE
# Include useful testing resource functions
. ../../../resources/shellHelperFunctions.sh
. "$KEYMAN_ROOT/resources/shellHelperFunctions.sh"
SCRIPT_ROOT="$(dirname "$THIS_SCRIPT")"
# A simple utility script to facilitate unit-testing for the LM Layer.
# It's rigged to be callable by NPM to facilitate testing during development when in other folders.
@ -39,7 +41,7 @@ test-browsers ( ) {
_FLAGS="$_FLAGS -CI -reporter teamcity"
fi
in_browser/browser-test.sh $os_id $_FLAGS
$SCRIPT_ROOT/in_browser/browser-test.sh $os_id $_FLAGS
}
# Defaults