mirror of
https://github.com/youzan/vant.git
synced 2025-10-22 11:54:02 +00:00
test: update test cases of utils
This commit is contained in:
10
packages/vant-use/src/test/utils.spec.ts
Normal file
10
packages/vant-use/src/test/utils.spec.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { raf, cancelRaf } from '../utils';
|
||||
|
||||
test('raf', async () => {
|
||||
const spy = jest.fn();
|
||||
raf(spy);
|
||||
|
||||
// await later(50);
|
||||
expect(spy).toHaveBeenCalledTimes(1);
|
||||
cancelRaf(1);
|
||||
});
|
||||
Reference in New Issue
Block a user