mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	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)
		
			
				
	
	
		
			14 lines
		
	
	
		
			277 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			14 lines
		
	
	
		
			277 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash -e
 | 
						|
 | 
						|
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
 | 
						|
$NODEJS unread.js
 | 
						|
$NODEJS search.js
 |