vant/packages/vant-use/test/utils.spec.ts
2023-08-20 18:48:09 +08:00

10 lines
170 B
TypeScript

import { raf, cancelRaf } from '../src/utils';
test('raf', async () => {
const spy = vi.fn();
raf(spy);
expect(spy).toHaveBeenCalledTimes(1);
cancelRaf(1);
});