Additional Icons (#43)

This commit is contained in:
Simon J
2021-09-03 13:03:50 +10:00
committed by GitHub
parent f8f8224213
commit 9092050c37
10 changed files with 184 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ import {
festivals,
allOf,
features,
STAR_WARS,
} from "../src/icon";
describe("SvgIcon", () => {
@@ -635,6 +636,31 @@ describe("festivals", () => {
});
});
describe("on may 4", () => {
beforeEach(() => {
now = dayjs("2022/5/4");
});
it("should use the undefined colors, so no color", () => {
const result = original
.apply(
features({
viewPortIncreasePercent: 12,
backgroundColor: "shouldNotBeUsed",
foregroundColor: "shouldNotBeUsed",
})
)
.apply(festivals(clock)) as DummyIcon;
expect(STAR_WARS.map(it => it.svg)).toContain(result.svg);
expect(result.features).toEqual({
viewPortIncreasePercent: 12,
backgroundColor: undefined,
foregroundColor: undefined,
});
});
});
describe("on cny", () => {
describe("2022", () => {
beforeEach(() => {