Files
agent-reach/tests
nyxst4ck c2e1a5d1f4 test(youtube): add unit tests for the YouTubeChannel readiness check
YouTube's readiness is layered, so 13 tests stub probe_command /
shutil.which to exercise every branch offline:

- can_handle across youtube.com / youtu.be hosts (www/m subdomains,
  case-insensitive) + rejection of unrelated hosts.
- _has_js_runtime_config: missing file -> False, "--js-runtimes" present
  -> True, absent -> False, and OSError on read -> False.
- check() probe states: missing -> off, broken -> error (hint surfaced),
  timeout/unrunnable -> error; active_backend cleared in all three.
- check() JS-runtime gating: no deno/node -> warn, Node-only with config
  missing the flag -> warn, deno present -> ok; once the probe is ok the
  backend is attributed (yt-dlp) regardless of the JS/transcription nuance.
- check() transcription readiness: a configured whisper provider with
  ffmpeg present reports it, and a missing ffmpeg is flagged.

Follow-up to #331 — extends dedicated channel coverage after rss (#360),
github (#361), web (#363), reddit (#364), xueqiu (#365) and v2ex (#366).
2026-06-13 16:15:30 -03:00
..