vant/packages/vant-use/test/utils.spec.ts
2021-11-11 11:08:02 +08:00

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);
});