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

Function createPost

packages/webapp/__tests__/SharePostServerSideProps.spec.ts:18–29  ·  view source on GitHub ↗
(noindex: boolean)

Source from the content-addressed store, hash-verified

16const mockRequest = gqlClient.request as jest.Mock;
17
18const createPost = (noindex: boolean) => ({
19 id: 'p-1',
20 type: PostType.Article,
21 title: 'Post title',
22 slug: 'post-title-p-1',
23 numUpvotes: 10,
24 createdAt: new Date('2024-01-01').toISOString(),
25 updatedAt: new Date('2024-01-02').toISOString(),
26 language: 'en',
27 tags: ['seo'],
28 noindex,
29});
30
31const runGssp = () =>
32 getServerSideProps({

Calls

no outgoing calls

Tested by

no test coverage detected