Content-Length: 284063 | pFad | http://github.com/vueuse/vueuse/pull/4857/commits/ae0720ce630d6aad382a38df27e5eb6e47babae1

2E fix(useVirtualList): resolve invalid watch source by cszhjh · Pull Request #4857 · vueuse/vueuse · GitHub
Skip to content

fix(useVirtualList): resolve invalid watch source #4857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 11, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test(useVirtualList): add test case
  • Loading branch information
cszhjh committed Jul 9, 2025
commit ae0720ce630d6aad382a38df27e5eb6e47babae1
12 changes: 11 additions & 1 deletion packages/core/useVirtualList/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
import { describe, expect, it } from 'vitest'
import { describe, expect, it, vi } from 'vitest'
import { ref as deepRef } from 'vue'
import { useVirtualList } from './index'

describe('useVirtualList', () => {
it('should be defined', () => {
expect(useVirtualList).toBeDefined()
})

it('should not warn when list is a plain array', async () => {
const spy = vi.spyOn(console, 'warn').mockImplementation(() => {})

useVirtualList(['a', 'b', 'c', 'd', 'e', 'f'], { itemWidth: () => 50, overscan: 1 })

expect(spy).not.toHaveBeenCalled()

spy.mockRestore()
})
})

describe('useVirtualList, vertical', () => {
Expand Down
Loading








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/vueuse/vueuse/pull/4857/commits/ae0720ce630d6aad382a38df27e5eb6e47babae1

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy