Split site definitions and generate default collection
This commit is contained in:
parent
3ccdaaf953
commit
40895e05db
10 changed files with 169 additions and 14 deletions
|
|
@ -97,7 +97,7 @@ describe("DefinitionEngine", () => {
|
|||
|
||||
it("selects Threads on current and legacy domains", () => {
|
||||
const threads = BUILTIN_DEFINITIONS.find((candidate) => candidate.id === "threads")!;
|
||||
document.body.innerHTML = '<div role="article" data-pressable-container="true"></div>';
|
||||
document.body.innerHTML = '<div data-pressable-container="true"></div>';
|
||||
for (const url of ["https://threads.com/home", "https://www.threads.com/@alice/post/ABC123", "https://threads.net/home", "https://www.threads.net/@alice/post/ABC123"]) {
|
||||
expect(selectDefinition([threads], url)).toBe(threads);
|
||||
}
|
||||
|
|
|
|||
2
tests/fixtures/threads-feed.html
vendored
2
tests/fixtures/threads-feed.html
vendored
|
|
@ -1,5 +1,5 @@
|
|||
<main>
|
||||
<div role="article" data-pressable-container="true">
|
||||
<div data-pressable-container="true">
|
||||
<a href="/@alice"><span dir="auto">alice</span></a>
|
||||
<a href="/@alice/post/ABC123"><time><span dir="auto">12h</span></time></a>
|
||||
<span dir="auto">First Threads post with <span>visible text</span></span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue