mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			581 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			581 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| import { validateSchema } from '../validate';
 | |
| import { ProfileSchema } from './profile-schema';
 | |
| 
 | |
| test('profileSchema', () => {
 | |
|     const data: ProfileSchema = {
 | |
|         rootRole: {
 | |
|             id: 1,
 | |
|             type: 'root',
 | |
|             name: 'Admin',
 | |
|         },
 | |
|         projects: ['default', 'secretproject'],
 | |
|         features: [
 | |
|             { name: 'firstFeature', project: 'default' },
 | |
|             { name: 'secondFeature', project: 'secretproject' },
 | |
|         ],
 | |
|     };
 | |
| 
 | |
|     expect(
 | |
|         validateSchema('#/components/schemas/profileSchema', data),
 | |
|     ).toBeUndefined();
 | |
| });
 |