mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 18:54:24 +00:00
11 lines
190 B
TypeScript
11 lines
190 B
TypeScript
import { raf, cancelRaf } from '../utils';
|
|
|
|
test('raf', async () => {
|
|
const spy = jest.fn();
|
|
raf(spy);
|
|
|
|
// await later(50);
|
|
expect(spy).toHaveBeenCalledTimes(1);
|
|
cancelRaf(1);
|
|
});
|