#69 : Add unit tests

This commit is contained in:
Vadim
2021-09-12 18:38:00 +03:00
parent 89b32eda32
commit beaf6989d0
4 changed files with 202 additions and 24 deletions

View File

@@ -14,7 +14,7 @@
} from '../../utils/event'
import {
applyParticleSizes,
getCurrentPageIndex,
getCurrentPageIndexByCurrentParticleIndex,
getPartialPageSize,
getPagesCountByParticlesCount,
getParticleIndexByPageIndex,
@@ -157,10 +157,11 @@
})
let currentParticleIndex = 0
$: currentPageIndex = getCurrentPageIndex({
$: currentPageIndex = getCurrentPageIndexByCurrentParticleIndex({
currentParticleIndex,
particlesCount,
headClonesCount: clonesCount.head,
clonesCountHead: clonesCount.head,
clonesCountTotal: clonesCount.total,
infinite,
particlesToScroll,
})
@@ -232,8 +233,8 @@
clonesToAppend,
clonesToPrepend,
} = getClones({
headClonesCount: clonesCount.head,
tailClonesCount: clonesCount.tail,
clonesCountHead: clonesCount.head,
clonesCountTail: clonesCount.tail,
particlesContainerChildren: particlesContainer.children,
})
applyClones({