feat: expand advanced widget experiences
This commit is contained in:
1 parent
55226842f9
commit
65a7e84bea
137 files changed
+3684
-850
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, test } from "vitest";
|
||||
|
||||
import { feedDescriptionToText, getHostname } from "./component";
|
||||
import { feedDescriptionToText, getHostname, getRssEntryDisplay } from "./component";
|
||||
|
||||
describe("RSS feed display helpers", () => {
|
||||
test("renders feed markup as inert text", () => {
|
||||
@@ -13,4 +13,22 @@ describe("RSS feed display helpers", () => {
|
||||
expect(getHostname("not a URL")).toBe("not a URL");
|
||||
expect(getHostname("https://example.com/feed.xml")).toBe("example.com");
|
||||
});
|
||||
|
||||
test("advanced mode exposes all fetched entry details", () => {
|
||||
expect(
|
||||
getRssEntryDisplay({
|
||||
isAdvanced: true,
|
||||
isDense: true,
|
||||
isTiny: true,
|
||||
hideDescription: true,
|
||||
showPosterImage: false,
|
||||
descriptionLines: 1,
|
||||
}),
|
||||
).toEqual({
|
||||
showDescription: true,
|
||||
showImage: true,
|
||||
showSource: true,
|
||||
descriptionLineClamp: undefined,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user