You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							24 lines
						
					
					
						
							369 B
						
					
					
				
			
		
		
	
	
							24 lines
						
					
					
						
							369 B
						
					
					
				'use strict'; | 
						|
const state = { | 
						|
	PENDING: 0, | 
						|
	COMPLETED: 1, | 
						|
	FAILED: 2, | 
						|
	SKIPPED: 3 | 
						|
}; | 
						|
 | 
						|
state.toString = input => { | 
						|
	switch (input) { | 
						|
		case state.PENDING: | 
						|
			return 'pending'; | 
						|
		case state.COMPLETED: | 
						|
			return 'completed'; | 
						|
		case state.FAILED: | 
						|
			return 'failed'; | 
						|
		case state.SKIPPED: | 
						|
			return 'skipped'; | 
						|
		default: | 
						|
			return 'unknown'; | 
						|
	} | 
						|
}; | 
						|
 | 
						|
module.exports = state;
 | 
						|
 |