MCPcopy Create free account
hub / github.com/dailydotdev/apps / buildComment

Function buildComment

packages/webapp/components/PostSEOSchema.spec.ts:44–61  ·  view source on GitHub ↗
(overrides: Partial<Comment> = {})

Source from the content-addressed store, hash-verified

42 }) as unknown as Post;
43
44const buildComment = (overrides: Partial<Comment> = {}): Comment =>
45 ({
46 id: 'comment-id',
47 contentHtml: '<p>Hello <strong>world</strong></p>',
48 createdAt: '2026-01-01T01:00:00.000Z',
49 lastUpdatedAt: '2026-01-01T01:05:00.000Z',
50 permalink: 'https://app.daily.dev/posts/post-slug#comment',
51 numUpvotes: 2,
52 author: {
53 id: 'comment-author-id',
54 name: 'Commenter',
55 username: 'commenter',
56 permalink: 'https://app.daily.dev/commenter',
57 companies: [],
58 },
59 children: { edges: [] },
60 ...overrides,
61 }) as unknown as Comment;
62
63describe('PostSEOSchema JSON-LD helpers', () => {
64 it('returns parseable JSON-LD for article posts', () => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected