- let invalidOptionsList = [
- to_table({"musicOnly": true, "feelingLucky": false, "fullScreen": true, "download": false}),
- to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": true})
- ]
- for invalidOptions in invalidOptionsList:
- check(not isValidOptions(invalidOptions))
- let validOptionsList = [
- to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": false, "download": true}),
- to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": false})
- ]
- for validOptions in validOptionsList:
- check(isValidOptions(validOptions))
+ let invalidOptionsList = [
+ to_table({"musicOnly": true, "feelingLucky": false, "fullScreen": true, "download": false}),
+ to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": true})
+ ]
+ for invalidOptions in invalidOptionsList:
+ check(not isValidOptions(invalidOptions))
+ let validOptionsList = [
+ to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": false, "download": true}),
+ to_table({"musicOnly": false, "feelingLucky": true, "fullScreen": true, "download": false})
+ ]
+ for validOptions in validOptionsList:
+ check(isValidOptions(validOptions))
+
+ test "rewrite invidious urls":
+ let url = "https://invidious.snopyta.org/watch?v=sZhxCUay5ks"
+ check(rewriteInvidiousToYouTube(url) == "https://www.youtube.com/watch?v=sZhxCUay5ks")