(id: string, hero?: PostHero | null)
| 1733 | const sourceFixture = defaultFeedPage.edges[0].node.source; |
| 1734 | |
| 1735 | const buildPost = (id: string, hero?: PostHero | null): Post => |
| 1736 | ({ |
| 1737 | id, |
| 1738 | title: `Post ${id}`, |
| 1739 | createdAt: '2026-05-25T00:00:00.000Z', |
| 1740 | image: 'https://daily.dev/img.png', |
| 1741 | readTime: 1, |
| 1742 | source: sourceFixture, |
| 1743 | tags: [], |
| 1744 | permalink: `http://localhost:4000/r/${id}`, |
| 1745 | numComments: 0, |
| 1746 | numUpvotes: 0, |
| 1747 | commentsPermalink: `http://localhost:5002/posts/${id}`, |
| 1748 | read: false, |
| 1749 | upvoted: false, |
| 1750 | commented: false, |
| 1751 | type: PostType.Article, |
| 1752 | domain: 'example.com', |
| 1753 | hero: hero ?? null, |
| 1754 | } as Post); |
| 1755 | |
| 1756 | const SIGNIFICANCE_BY_SIZE: Record<number, PostHeroSignificance> = { |
| 1757 | 4: 'breaking', |
no outgoing calls
no test coverage detected