Add the "static" directory to NODE_PATH for unit tests.

I added our "static" directory to NODE_PATH for our JS unit tests.
This eliminates most of the verbosity in our require statements, but
it still requires us to explicitly call out "js" or "third"
subdirectories, which should make it a bit easier for folks reading
the tests to distinguish modules from js, third, or node itself.

(imported from commit b77a5283135d388d46f4b7e511acc59986f1a8ba)
This commit is contained in:
Steve Howell
2013-08-01 11:53:10 -04:00
parent 44e59dfaea
commit 2442edee9e
4 changed files with 11 additions and 7 deletions

View File

@@ -2,6 +2,10 @@
cd "$(dirname "$0")"/../zephyr/tests/frontend/node
STATIC_DIR=`python -c 'import os;print os.path.realpath("../../../../static")'`
export NODE_PATH=$STATIC_DIR
NODEJS=$(which nodejs || which node)
$NODEJS message_tour.js