Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
feat(forum): add createPost handler test
Browse files Browse the repository at this point in the history
  • Loading branch information
fargito committed Apr 4, 2022
1 parent 7e9bb3d commit c8ce2cd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions backend/forum/functions/createPost/handler.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { handler } from './handler';

describe('createPost handler', () => {
it('should return a post with the created content', async () => {
const postContent = 'Hello from Swarmion';

const { content } = await handler({
pathParameters: { threadId: 'blob' },
body: { content: postContent },
});

expect(content).toEqual(postContent);
});
});

0 comments on commit c8ce2cd

Please sign in to comment.