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

Function createPost

packages/webapp/__tests__/PostStaticProps.spec.ts:37–60  ·  view source on GitHub ↗
({
  type,
  upvotes,
  noindex = false,
}: {
  type: PostType;
  upvotes: number;
  noindex?: boolean;
})

Source from the content-addressed store, hash-verified

35};
36
37const createPost = ({
38 type,
39 upvotes,
40 noindex = false,
41}: {
42 type: PostType;
43 upvotes: number;
44 noindex?: boolean;
45}): TestPost => ({
46 id: 'post-id',
47 type,
48 title: `${type} title`,
49 slug: `${type}-slug`,
50 numUpvotes: upvotes,
51 createdAt: new Date('2024-01-01').toISOString(),
52 updatedAt: new Date('2024-01-02').toISOString(),
53 language: 'en',
54 tags: ['seo'],
55 image: 'https://example.com/post.png',
56 noindex,
57 author: {
58 permalink: 'https://example.com/@author',
59 },
60});
61
62describe('post static props seo', () => {
63 beforeEach(() => {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected