Add new icons, repair icon sizing

This commit is contained in:
simojenki
2021-08-30 15:56:43 +10:00
parent ca9bf2fc04
commit ee0a0747ee
33 changed files with 270 additions and 275 deletions

View File

@@ -3,6 +3,9 @@ import libxmljs from "libxmljs2";
import {
ColorOverridingIcon,
contains,
containsWord,
eq,
HOLI_COLORS,
Icon,
iconForGenre,
@@ -472,6 +475,41 @@ describe("makeFestive", () => {
});
});
describe("eq", () => {
it("should be true when ===", () => {
expect(eq("Foo")("foo")).toEqual(true);
});
it("should be false when not ===", () => {
expect(eq("Foo")("bar")).toEqual(false);
});
});
describe("contains", () => {
it("should be true word is a substring", () => {
expect(contains("Foo")("some foo bar")).toEqual(true);
});
it("should be false when not ===", () => {
expect(contains("Foo")("some bar")).toEqual(false);
});
});
describe("containsWord", () => {
it("should be true word is a substring with space delim", () => {
expect(containsWord("Foo")("some foo bar")).toEqual(true);
});
it("should be true word is a substring with hyphen delim", () => {
expect(containsWord("Foo")("some----foo-bar")).toEqual(true);
});
it("should be false when not ===", () => {
expect(containsWord("Foo")("somefoobar")).toEqual(false);
});
});
describe("iconForGenre", () => {
[
["Acid House", "mushroom"],