From fac881d61176f04a4062db710df98924a76b0ffb Mon Sep 17 00:00:00 2001
From: Terry Truong <terry06890@gmail.com>
Date: Sun, 18 Dec 2022 20:26:07 +1100
Subject: Add unit testing

Install vitest, happy-dom, and @testing-library/vue
Add lib.ts and rbtree.ts tests in tests/
Modularise some date-range-managing code from App.vue into lib.ts
---
 src/components/BaseLine.vue | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src/components/BaseLine.vue')

diff --git a/src/components/BaseLine.vue b/src/components/BaseLine.vue
index 33d8a88..0187b20 100644
--- a/src/components/BaseLine.vue
+++ b/src/components/BaseLine.vue
@@ -43,7 +43,7 @@ const periods: Ref<Period[]> = ref([
 const skipTransition = ref(true);
 onMounted(() => setTimeout(() => {skipTransition.value = false}, 100));
 
-// For size tracking (used to prevent time spans shrinking below 1 pixel)
+// For size and mount-status tracking
 const width = ref(0);
 const height = ref(0);
 const mounted = ref(false);
@@ -87,7 +87,7 @@ function spanStyles(state: TimelineState){
 	let start = state.startDate.clone();
 	let end = state.endDate.clone();
 	let scale = SCALES[state.scaleIdx];
-	if (scale != MONTH_SCALE && scale != DAY_SCALE){ // Possibly incorporate offsets
+	if (scale != MONTH_SCALE && scale != DAY_SCALE){ // Account for offsets
 		stepDate(start, 1, {forward: false, count: Math.floor(state.startOffset * scale), inplace: true});
 		stepDate(end, 1, {count: Math.floor(state.endOffset * scale), inplace: true});
 	}
-- 
cgit v1.2.3

