mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-22 01:43:29 +01:00
Icons for genres with backgrounds, text, and ability to specify text color and font family (#34)
This commit is contained in:
@@ -1370,10 +1370,20 @@ describe("server", () => {
|
||||
|
||||
expect(response.status).toEqual(200);
|
||||
const svg = Buffer.from(response.body).toString();
|
||||
expect(svg).toContain(`fill:brightblue`);
|
||||
expect(svg).toContain(`fill:brightpink`);
|
||||
expect(svg).toContain(`fill="brightblue"`);
|
||||
expect(svg).toContain(`fill="brightpink"`);
|
||||
});
|
||||
|
||||
it("should return an icon with text if requested", async () => {
|
||||
const response = await request(server(SystemClock)).get(
|
||||
`/icon/${type}/size/180?text=foobar1000`
|
||||
);
|
||||
|
||||
expect(response.status).toEqual(200);
|
||||
const svg = Buffer.from(response.body).toString();
|
||||
expect(svg).toContain(`foobar1000`);
|
||||
});
|
||||
|
||||
it("should return a christmas icon on christmas day", async () => {
|
||||
const response = await request(server({ now: () => dayjs("2022/12/25") })).get(
|
||||
`/icon/${type}/size/180`
|
||||
@@ -1381,8 +1391,8 @@ describe("server", () => {
|
||||
|
||||
expect(response.status).toEqual(200);
|
||||
const svg = Buffer.from(response.body).toString();
|
||||
expect(svg).toContain(`fill:red`);
|
||||
expect(svg).toContain(`fill:green`);
|
||||
expect(svg).toContain(`fill="red"`);
|
||||
expect(svg).toContain(`fill="green"`);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user