| 10 | } from './PostSEOSchema'; |
| 11 | |
| 12 | const buildPost = (overrides: Partial<Post> = {}): Post => |
| 13 | ({ |
| 14 | id: 'post-id', |
| 15 | slug: 'post-slug', |
| 16 | title: 'A post title', |
| 17 | permalink: 'https://app.daily.dev/posts/post-slug', |
| 18 | commentsPermalink: 'https://app.daily.dev/posts/post-slug', |
| 19 | type: PostType.Article, |
| 20 | createdAt: '2026-01-01T00:00:00.000Z', |
| 21 | updatedAt: '2026-01-01T00:10:00.000Z', |
| 22 | image: 'https://media.daily.dev/image.jpg', |
| 23 | tags: ['react', 'typescript'], |
| 24 | readTime: 5, |
| 25 | language: 'en', |
| 26 | numComments: 3, |
| 27 | numUpvotes: 10, |
| 28 | source: { |
| 29 | id: 'source-id', |
| 30 | name: 'daily.dev', |
| 31 | image: 'https://media.daily.dev/source.jpg', |
| 32 | permalink: 'https://app.daily.dev/sources/daily', |
| 33 | }, |
| 34 | author: { |
| 35 | id: 'author-id', |
| 36 | name: 'Author Name', |
| 37 | username: 'author', |
| 38 | permalink: 'https://app.daily.dev/author', |
| 39 | companies: [], |
| 40 | }, |
| 41 | ...overrides, |
| 42 | }) as unknown as Post; |
| 43 | |
| 44 | const buildComment = (overrides: Partial<Comment> = {}): Comment => |
| 45 | ({ |