mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
		
			606 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			606 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { validateSchema } from '../validate';
 | 
						|
import { TokenUserSchema } from './token-user-schema';
 | 
						|
 | 
						|
test('tokenUserSchema', () => {
 | 
						|
    const data: TokenUserSchema = {
 | 
						|
        id: 0,
 | 
						|
        name: '',
 | 
						|
        email: '',
 | 
						|
        createdBy: '',
 | 
						|
        token: '',
 | 
						|
        role: {
 | 
						|
            id: 0,
 | 
						|
            description: '',
 | 
						|
            name: '',
 | 
						|
            type: '',
 | 
						|
        },
 | 
						|
    };
 | 
						|
 | 
						|
    expect(
 | 
						|
        validateSchema('#/components/schemas/tokenUserSchema', data),
 | 
						|
    ).toBeUndefined();
 | 
						|
 | 
						|
    expect(
 | 
						|
        validateSchema('#/components/schemas/tokenUserSchema', {}),
 | 
						|
    ).toMatchSnapshot();
 | 
						|
});
 |