import assert from "node:assert/strict"; import test from "node:test"; import { localRecordingFetchRefusal } from "./local-recording.mjs"; test("a local recording is refused by id or by platform; anything else may fetch", () => { const id = "local-" + "a".repeat(32); assert.equal(localRecordingFetchRefusal(id, null), `"${id}" is a local recording with no online source, so no clip can be fetched for it.`); assert.match(localRecordingFetchRefusal("anything", "local"), /local recording with no online source/); assert.equal(localRecordingFetchRefusal("dQw4w9WgXcQ", "youtube"), null); assert.equal(localRecordingFetchRefusal("local-short", null), null); });