Advertisement
FireController1847

YTDL Test Output

Jun 26th, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.86 KB | None | 0 0
  1. Download video
  2. ✓ Should be pipeable and data equal to stored file (109ms)
  3. ✓ Fals gracefully if error getting info
  4. destroy stream
  5. immediately
  6. ✓ Doesn't start the download
  7. right after request is made
  8. ✓ Doesn't start the download
  9. after download has started
  10. ✓ Download is incomplete
  11. stream disconnects before end
  12. ✓ Still downloads the whole video (45ms)
  13. with range
  14. ✓ Downloads from the given `start` to `end`
  15. Stream keeps disconnecting
  16. ✓ Too many reconnects
  17. with range
  18. ✓ Range added to download URL
  19. with begin
  20. ✓ Begin added to download URL
  21. with a bad filter
  22. ✓ Emits error
  23. that is broadcasted live
  24. ✓ Begins downloading video succesfully
  25.  
  26. ytdl.getInfo()
  27. From a regular video
  28. ✓ Retrieves correct metainfo
  29. Use `ytdl.downloadFromInfo()`
  30. ✓ Retrives video file
  31. Pass request options
  32. ✓ Request gets called with more headers
  33. Using the promise API
  34. ✓ Retrieves correct metainfo
  35. On a video that fails
  36. ✓ Error is catched
  37. From a non-existant video
  38. ✓ Should give an error
  39. From an age restricted video
  40. ✓ Returns correct video metainfo
  41. In any language
  42. ✓ Returns correct video metainfo
  43. From a video that was live streamed
  44. ✓ Returns correct video metainfo
  45. From a rental
  46. ✓ Returns an error about it
  47. From a video that is not yet available
  48. ✓ Returns an error
  49. With a bad video ID
  50. ✓ Returns an error
  51. When there is an error requesting one of the pages
  52. ✓ Fails gracefully when unable to get watch page
  53. ✓ Fails gracefully when unable to find config
  54. ✓ Fails gracefully when unable to parse config
  55. ✓ Fails gracefully when unable to get embed page
  56. ✓ Fails gracefully when unable to get video info page
  57. ✓ Fails gracefully when get video info page errors
  58. ✓ Fails gracefully when unable to get html5player tokens
  59. ✓ Fails gracefully when unable to get m3u8 playlist
  60. ✓ Fails gracefully when no formats are found
  61. ✓ Fails gracefully when unable to parse player_response
  62. When encountering a format not yet known with debug
  63. ✓ Warns the console
  64.  
  65. Try downloading videos without mocking
  66. Regular video
  67. 1) Request status code is not 403 Forbidden
  68. VEVO
  69. 2) Request status code is not 403 Forbidden
  70. VEVO 2
  71. 3) Request status code is not 403 Forbidden
  72. Age restricted VEVO
  73. 4) Request status code is not 403 Forbidden
  74. Age restricted
  75. 5) Request status code is not 403 Forbidden
  76. Age restricted 2
  77. 6) Request status code is not 403 Forbidden
  78. Embed domain restricted
  79. 7) Request status code is not 403 Forbidden
  80. No embed allowed
  81. 8) Request status code is not 403 Forbidden
  82.  
  83. Get tokens
  84. ✓ Returns a set of tokens
  85. Hit the same video twice
  86. ✓ Gets html5player tokens from cache
  87. Get a bad html5player file
  88. ✓ Gives an error
  89. Unable to find key in filename
  90. ✓ Warns the console, still attempts to get tokens
  91. Unable to find tokens
  92. ✓ Gives an error
  93.  
  94. Signature decipher
  95. extract deciphering actions
  96. ✓ Returns the correct set of actions (60ms)
  97. properly apply actions based on tokens
  98. ✓ reverses
  99. ✓ swaps head and position
  100. ✓ slices
  101. ✓ real set of tokens
  102.  
  103. Set download URL
  104. ✓ Adds signature to download URL
  105. With a badly formatted URL
  106. ✓ Does not set URL
  107. With debug on
  108. ✓ Logs to console
  109. Without a URL
  110. ✓ Does not set URL
  111. With debug on
  112. ✓ Logs to console
  113.  
  114. util.parseTime()
  115. ✓ Returns milliseconds if given numbers
  116. ✓ Works with minutes and seconds
  117. ✓ And even only hours and milliseconds
  118.  
  119. util.sortFormats()
  120. With `highest` given
  121. ✓ Sorts available formats from highest to lowest quality
  122.  
  123. util.chooseFormat
  124. ✓ Is exposed in module
  125. with no options
  126. ✓ Chooses highest quality
  127. With lowest quality wanted
  128. ✓ Chooses lowest itag
  129. With highest audio quality wanted
  130. ✓ Chooses highest audio itag
  131. With highest video quality wanted
  132. ✓ Chooses highest video itag
  133. With itag given
  134. ✓ Chooses matching format
  135. that is not in the format list
  136. ✓ Returns an error
  137. With list of itags given
  138. ✓ Chooses matching format
  139. With format object given
  140. ✓ Chooses given format without searching
  141. With filter given
  142. that matches a format
  143. ✓ Chooses a format
  144. that does not match a format
  145. ✓ Returns an error
  146.  
  147. util.filterFormats
  148. ✓ Tries to find formats that match
  149. ✓ Is exposed in module
  150. that doesn't match any format
  151. ✓ Returns an empty list
  152. With `video` given
  153. ✓ Returns only matching formats
  154. With `videoonly` given
  155. ✓ Returns only matching formats
  156. With `audio` given
  157. ✓ Returns only matching formats
  158. With `audioonly` given
  159. ✓ Returns only matching formats
  160. With `audioandvideo` given
  161. ✓ Returns only matching formats
  162. With unsupported filter given
  163. ✓ Returns only matching formats
  164.  
  165. util.between()
  166. ✓ `left` positioned at the start
  167. ✓ somewhere in the middle
  168. ✓ not found
  169. ✓ `right` before `left`
  170. ✓ `right` not found
  171.  
  172. util.getURLVideoID()
  173. ✓ Is exposed in module
  174. ✓ Retrives the video ID from the url
  175.  
  176. util.getVideoID()
  177. ✓ Is exposed in module
  178. ✓ Retrives the video ID from the url
  179.  
  180. util.validateID()
  181. ✓ Is exposed in module
  182. ✓ Retrieves whether a string includes a video ID
  183.  
  184. util.validateURL()
  185. ✓ Is exposed in module
  186. ✓ Retrieves whether a string includes a parsable video ID
  187.  
  188. util.parseFormats()
  189. ✓ Retrieves video formats from info
  190.  
  191. util.getVideoDescription()
  192. ✓ Retrieves formatted video description
  193. ✓ Fallbacks to empty description if element not found
  194.  
  195. util.getAuthor()
  196. ✓ Returns video author object
  197. ✓ Returns empty object if author not found
  198.  
  199. util.getPublished()
  200. ✓ Retrieves formatted published date
  201.  
  202. util.getRelatedVideos()
  203. ✓ Returns related videos
  204. ✓ Returns empty array when error parsing
  205.  
  206. util.parallel()
  207. Multiple asynchronous functions
  208. ✓ Calls callback with results
  209. where one of them errors
  210. ✓ Gives an error
  211. Zero functions
  212. ✓ Still calls callback
  213. call callback twice
  214. ✓ Only calls final callback once
  215.  
  216. util.fromHumanTime
  217. ✓ Time format 00:00:00.000
  218. ✓ Time format 0ms, 0s, 0m, 0h
  219. ✓ No format
  220.  
  221.  
  222. 102 passing (2m)
  223. 8 failing
  224.  
  225. 1) Try downloading videos without mocking
  226. Regular video
  227. Request status code is not 403 Forbidden:
  228. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  229.  
  230.  
  231. 2) Try downloading videos without mocking
  232. VEVO
  233. Request status code is not 403 Forbidden:
  234. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  235.  
  236.  
  237. 3) Try downloading videos without mocking
  238. VEVO 2
  239. Request status code is not 403 Forbidden:
  240. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  241.  
  242.  
  243. 4) Try downloading videos without mocking
  244. Age restricted VEVO
  245. Request status code is not 403 Forbidden:
  246. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  247.  
  248.  
  249. 5) Try downloading videos without mocking
  250. Age restricted
  251. Request status code is not 403 Forbidden:
  252. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  253.  
  254.  
  255. 6) Try downloading videos without mocking
  256. Age restricted 2
  257. Request status code is not 403 Forbidden:
  258. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  259.  
  260.  
  261. 7) Try downloading videos without mocking
  262. Embed domain restricted
  263. Request status code is not 403 Forbidden:
  264. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
  265.  
  266.  
  267. 8) Try downloading videos without mocking
  268. No embed allowed
  269. Request status code is not 403 Forbidden:
  270. Error: Timeout of 16000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement