mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user