-import unittest
+import
+ tables,
+ unittest
import lib
+import nimcoon
suite "Playing direct links":
let expected = "https://www.youtube.com/watch?v=QOEMv0S8AcA"
check(sanitizeURL("https://youtu.be/QOEMv0S8AcA") == expected)
check(sanitizeURL("https://www.youtube.com/watch\\?v\\=QOEMv0S8AcA") == expected)
+
+ test "validate options":
+ let invalidOptions = to_table({"musicOnly": true, "feelingLucky": false, "fullScreen": true, "download": false})
+ check(not isValidOptions(invalidOptions))
+ let validOptions = to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": true})
+ check(isValidOptions(validOptions))