All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 50s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
663 B
TypeScript
17 lines
663 B
TypeScript
import { html, stubNetwork } from "../../helpers.ts";
|
|
import { assertEquals, assertStringIncludes } from "@std/assert";
|
|
import { fetchRichContent } from "../../../services/rich-content-service.ts";
|
|
|
|
Deno.test("soundcloud provider", async () => {
|
|
using _ = stubNetwork(() =>
|
|
html(`<meta property="og:title" content="Album">
|
|
<meta property="og:video" content="https://bandcamp.com/EmbeddedPlayer/album=1">`)
|
|
);
|
|
const sc = await fetchRichContent("https://soundcloud.com/artist/track");
|
|
assertEquals(sc?.type, "soundcloud");
|
|
assertStringIncludes(
|
|
sc?.embedUrl ?? "",
|
|
encodeURIComponent("https://soundcloud.com/artist/track"),
|
|
);
|
|
});
|