Compare commits
3 Commits
47a8487ce9
...
7dbb35d298
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dbb35d298 | |||
| 108df323f9 | |||
| 2803bcd22c |
@@ -47,7 +47,8 @@ jobs:
|
|||||||
run: yarn test:unit
|
run: yarn test:unit
|
||||||
|
|
||||||
- name: Run Component Tests
|
- name: Run Component Tests
|
||||||
run: yarn test:component
|
timeout-minutes: 5
|
||||||
|
run: yarn test:component --reporter=verbose --logHeapUsage
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
needs: build # Only runs if tests/lint pass
|
needs: build # Only runs if tests/lint pass
|
||||||
|
|||||||
@@ -258,12 +258,13 @@ export function createVirtualizer<T>(
|
|||||||
// Calculate initial offset ONCE
|
// Calculate initial offset ONCE
|
||||||
const getElementOffset = () => {
|
const getElementOffset = () => {
|
||||||
const rect = node.getBoundingClientRect();
|
const rect = node.getBoundingClientRect();
|
||||||
return rect.top + window.scrollY;
|
const scrollY = typeof window !== 'undefined' ? window.scrollY : 0;
|
||||||
|
return rect.top + scrollY;
|
||||||
};
|
};
|
||||||
|
|
||||||
let cachedOffsetTop = 0;
|
let cachedOffsetTop = 0;
|
||||||
let rafId: number | null = null;
|
let rafId: number | null = null;
|
||||||
containerHeight = window.innerHeight;
|
containerHeight = typeof window !== 'undefined' ? window.innerHeight : 0;
|
||||||
|
|
||||||
const handleScroll = () => {
|
const handleScroll = () => {
|
||||||
if (rafId !== null) {
|
if (rafId !== null) {
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ export default defineConfig({
|
|||||||
restoreMocks: true,
|
restoreMocks: true,
|
||||||
setupFiles: ['./vitest.setup.component.ts', './vitest.setup.jsdom.ts'],
|
setupFiles: ['./vitest.setup.component.ts', './vitest.setup.jsdom.ts'],
|
||||||
globals: true,
|
globals: true,
|
||||||
|
testTimeout: 15000,
|
||||||
|
maxWorkers: process.env.CI ? 1 : undefined,
|
||||||
},
|
},
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
|
|||||||
Reference in New Issue
Block a user