mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	To use, make sure your Node installation is up to date and install istanbul with npm: sudo npm install -g istanbul # 'sudo' may be optional on OSX Then run tools/test-js-with-node cover and navigate to coverage/lcov-report/js/index.html in a browser. (imported from commit 2da4894d1725e2f9540b3895304246e3cd138f6c)
		
			
				
	
	
		
			17 lines
		
	
	
		
			376 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
		
			376 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/bin/bash -e
 | 
						|
 | 
						|
cd "$(dirname "$0")"/..
 | 
						|
 | 
						|
export NODE_PATH=static
 | 
						|
 | 
						|
INDEX_JS=zerver/tests/frontend/node/index.js
 | 
						|
NODEJS=$(which nodejs || which node)
 | 
						|
if [ f$1 = fcover ]; then
 | 
						|
  # Run a coverage test with Istanbul.
 | 
						|
  istanbul cover $INDEX_JS
 | 
						|
else
 | 
						|
  # Normal testing, no coverage analysis.
 | 
						|
  # Run the index.js test runner, which runs all the other tests.
 | 
						|
  $NODEJS $INDEX_JS
 | 
						|
fi
 |