mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
* Allow music service to return a URN identifying cover art for an entity * Fix bug with playlist cover art rending same album multiple times
23 lines
556 B
TypeScript
23 lines
556 B
TypeScript
import { v4 as uuid } from "uuid";
|
|
|
|
import { anArtist } from "./builders";
|
|
import { artistToArtistSummary } from "../src/music_service";
|
|
|
|
describe("artistToArtistSummary", () => {
|
|
it("should map fields correctly", () => {
|
|
const artist = anArtist({
|
|
id: uuid(),
|
|
name: "The Artist",
|
|
image: {
|
|
system: "external",
|
|
resource: "http://example.com:1234/image.jpg",
|
|
},
|
|
});
|
|
expect(artistToArtistSummary(artist)).toEqual({
|
|
id: artist.id,
|
|
name: artist.name,
|
|
image: artist.image,
|
|
});
|
|
});
|
|
});
|