« get me outta code hell

Improve test formatting, add timelineIndex-changed test - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFlorrie <towerofnix@gmail.com>2017-09-02 10:24:49 -0300
committerFlorrie <towerofnix@gmail.com>2017-09-02 10:24:49 -0300
commitea6249b614a281438638777ed58d7a2c8ecab679 (patch)
tree292dd0562c7232678d09eaf3da6884577852d9ec
parentf9c3e6470b4862beaaf285b2e46a0507e34d45f4 (diff)
Improve test formatting, add timelineIndex-changed test
-rw-r--r--src/pickers2.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/pickers2.js b/src/pickers2.js
index b7ae460..53b76a8 100644
--- a/src/pickers2.js
+++ b/src/pickers2.js
@@ -104,7 +104,16 @@ const createOrderedPicker = playlist => {
   console.log(hm.timeline)
   console.log('initial length:', hm.timeline.length)
   for (let i = 0; i < 6; i++) {
-    console.log('next:', hm.getNextTrack())
-    console.log('length:', hm.timeline.length)
+    console.log(`(${hm.timelineIndex}) next:`, hm.getNextTrack())
+    console.log(`(-> ${hm.timelineIndex}) length:`, hm.timeline.length)
+  }
+
+  console.log('setting timeline index to 2 (3)..')
+  hm.timelineIndex = 2
+  console.log('current:', hm.currentTrack)
+
+  for (let i = 0; i < 6; i++) {
+    console.log(`(${hm.timelineIndex}) next:`, hm.getNextTrack())
+    console.log(`(-> ${hm.timelineIndex}) length:`, hm.timeline.length)
   }
 }