mirror of
				https://gitee.com/vant-contrib/vant.git
				synced 2025-11-04 12:52:08 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
		
			172 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
		
			172 B
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
import { raf, cancelRaf } from '../src/utils';
 | 
						|
 | 
						|
test('raf', async () => {
 | 
						|
  const spy = jest.fn();
 | 
						|
  raf(spy);
 | 
						|
 | 
						|
  expect(spy).toHaveBeenCalledTimes(1);
 | 
						|
  cancelRaf(1);
 | 
						|
});
 |