mirror of
https://github.com/wkulhanek/bonob.git
synced 2025-12-21 17:33:29 +01:00
Add new icons, repair icon sizing
This commit is contained in:
@@ -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"],
|
||||
|
||||
Reference in New Issue
Block a user