mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			566 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			566 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { validateSchema } from '../validate';
 | 
						|
import { GroupsSchema } from './groups-schema';
 | 
						|
 | 
						|
test('groupsSchema', () => {
 | 
						|
    const data: GroupsSchema = {
 | 
						|
        groups: [
 | 
						|
            {
 | 
						|
                id: 1,
 | 
						|
                name: 'Group',
 | 
						|
                users: [
 | 
						|
                    {
 | 
						|
                        user: {
 | 
						|
                            id: 3,
 | 
						|
                        },
 | 
						|
                    },
 | 
						|
                ],
 | 
						|
            },
 | 
						|
        ],
 | 
						|
    };
 | 
						|
 | 
						|
    expect(
 | 
						|
        validateSchema('#/components/schemas/groupsSchema', data),
 | 
						|
    ).toBeUndefined();
 | 
						|
});
 |