mirror of
				https://codeberg.org/yeentown/barkey.git
				synced 2025-10-31 05:24:13 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			13 lines
		
	
	
	
		
			350 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			13 lines
		
	
	
	
		
			350 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { fromTuple } from '@/misc/from-tuple.js';
 | |
| 
 | |
| describe(fromTuple, () => {
 | |
| 	it('should return value when value is not an array', () => {
 | |
| 		const value = fromTuple('abc');
 | |
| 		expect(value).toBe('abc');
 | |
| 	});
 | |
| 
 | |
| 	it('should return first element when value is an array', () => {
 | |
| 		const value = fromTuple(['abc']);
 | |
| 		expect(value).toBe('abc');
 | |
| 	});
 | |
| });
 |