@ant-design-vue/use
Version:
Vue 3 Composition Api Library.
23 lines • 650 B
JavaScript
import useInViewport from '../index';
describe('useInViewport', function () {
it('should be defined', function () {
expect(useInViewport).toBeDefined();
}); // it('with argument', async () => {
// const eleRef = ref(null)
// let inViewPort!: Ref<boolean> | Ref<null>
// const wrapper = shallowMount({
// setup() {
// inViewPort = useInViewport(eleRef);
// return { eleRef };
// },
// render(_ctx) {
// return (
// <h1 ref='eleRef' >
// </h1>
// )
// }
// });
// await wrapper.vm.$nextTick()
// expect(inViewPort.value).toBe(true)
// });
});