Skip to content

Instantly share code, notes, and snippets.

@lekansogunle
Last active September 25, 2020 14:18
Show Gist options
  • Save lekansogunle/988cead26185cdf46cc1e12c441da9d9 to your computer and use it in GitHub Desktop.
Save lekansogunle/988cead26185cdf46cc1e12c441da9d9 to your computer and use it in GitHub Desktop.
const handler = require('../handler');
test('correctly create post', () => {
expect(handler.createPost({foo: 'bar'})).toStrictEqual({
statusCode: 200,
body: JSON.stringify(
{
message: 'Hello From Create Post!',
input: {foo: 'bar'},
},
null,
2
),
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment