mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-04 21:02:09 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			462 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			462 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
import NavBar from '..';
 | 
						|
import { mount } from '../../../test/utils';
 | 
						|
 | 
						|
test('render left & right slot', () => {
 | 
						|
  const wrapper = mount(NavBar, {
 | 
						|
    scopedSlots: {
 | 
						|
      left: () => 'Custom Left',
 | 
						|
      right: () => 'Custom Right'
 | 
						|
    }
 | 
						|
  });
 | 
						|
 | 
						|
  expect(wrapper).toMatchSnapshot();
 | 
						|
});
 | 
						|
 | 
						|
test('render title slot', () => {
 | 
						|
  const wrapper = mount(NavBar, {
 | 
						|
    scopedSlots: {
 | 
						|
      title: () => 'Custom Title'
 | 
						|
    }
 | 
						|
  });
 | 
						|
 | 
						|
  expect(wrapper).toMatchSnapshot();
 | 
						|
});
 |