mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	* refactor: avoid duplicate feature strategy operationIds * refactor: fix flaky feature tests * refactor: remove duplicate controller error handling * refactor: unify feature strategy schemas * refactor: add schemas to strategy controller
		
			
				
	
	
		
			29 lines
		
	
	
		
			685 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			685 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { validateSchema } from '../validate';
 | |
| import { StrategySchema } from './strategy-schema';
 | |
| 
 | |
| test('strategySchema', () => {
 | |
|     const data: StrategySchema = {
 | |
|         description: '',
 | |
|         name: '',
 | |
|         displayName: '',
 | |
|         editable: false,
 | |
|         deprecated: false,
 | |
|         parameters: [
 | |
|             {
 | |
|                 name: '',
 | |
|                 type: '',
 | |
|                 description: '',
 | |
|                 required: true,
 | |
|             },
 | |
|         ],
 | |
|     };
 | |
| 
 | |
|     expect(
 | |
|         validateSchema('#/components/schemas/strategySchema', data),
 | |
|     ).toBeUndefined();
 | |
| 
 | |
|     expect(
 | |
|         validateSchema('#/components/schemas/strategySchema', {}),
 | |
|     ).toMatchSnapshot();
 | |
| });
 |