Compare commits

...

3 Commits

Author SHA1 Message Date
Ilia Mashkov 7dbb35d298 fix: workflow
Workflow / build (push) Failing after 8m17s
Workflow / publish (push) Has been skipped
2026-04-23 14:16:07 +03:00
Ilia Mashkov 108df323f9 test: add timeout to fail the test instead of OOM 2026-04-23 14:16:06 +03:00
Ilia Mashkov 2803bcd22c fix(createVirtualizer): add window check to resolve the ReferenceError 2026-04-23 14:16:06 +03:00
3 changed files with 7 additions and 3 deletions
+2 -1
View File
@@ -47,7 +47,8 @@ jobs:
run: yarn test:unit
- name: Run Component Tests
run: yarn test:component
timeout-minutes: 5
run: yarn test:component --reporter=verbose --logHeapUsage
publish:
needs: build # Only runs if tests/lint pass
@@ -258,12 +258,13 @@ export function createVirtualizer<T>(
// Calculate initial offset ONCE
const getElementOffset = () => {
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 rafId: number | null = null;
containerHeight = window.innerHeight;
containerHeight = typeof window !== 'undefined' ? window.innerHeight : 0;
const handleScroll = () => {
if (rafId !== null) {
+2
View File
@@ -12,6 +12,8 @@ export default defineConfig({
restoreMocks: true,
setupFiles: ['./vitest.setup.component.ts', './vitest.setup.jsdom.ts'],
globals: true,
testTimeout: 15000,
maxWorkers: process.env.CI ? 1 : undefined,
},
resolve: {