mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	We're migrating to ESM, which will allow us to import the latest versions of our dependencies. Co-Authored-By: Christopher Kolstad <chriswk@getunleash.io>
		
			
				
	
	
		
			28 lines
		
	
	
		
			806 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			806 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import * as logger from './logger.js';
 | |
| 
 | |
| test('should require custom logger to implement info', () => {
 | |
|     const loggerImpl = {
 | |
|         debug: () => {},
 | |
|         warn: () => {},
 | |
|         error: () => {},
 | |
|     };
 | |
|     const provider = () => loggerImpl;
 | |
|     expect(() => {
 | |
|         // @ts-ignore:next-line
 | |
|         return logger.validateLogProvider(provider);
 | |
|     }).toThrowError(new TypeError('Logger must implement info'));
 | |
| });
 | |
| 
 | |
| test('should require custom logger to implement error', () => {
 | |
|     const loggerImpl = {
 | |
|         debug: () => {},
 | |
|         warn: () => {},
 | |
|         info: () => {},
 | |
|     };
 | |
|     const provider = () => loggerImpl;
 | |
|     expect(() => {
 | |
|         // @ts-ignore:next-line
 | |
|         return logger.validateLogProvider(provider);
 | |
|     }).toThrowError(new TypeError('Logger must implement error'));
 | |
| });
 |