Added Jest for testing both front and backend
This commit is contained in:
19
server/presenters/user.test.js
Normal file
19
server/presenters/user.test.js
Normal file
@@ -0,0 +1,19 @@
|
||||
import presentUser from './user';
|
||||
|
||||
import ctx from '../../__mocks__/ctx';
|
||||
|
||||
it('presents a user', async () => {
|
||||
const user = await presentUser(
|
||||
ctx,
|
||||
{
|
||||
id: '123',
|
||||
name: 'Test User',
|
||||
username: 'testuser',
|
||||
slackData: {
|
||||
image_192: 'http://example.com/avatar.png',
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
expect(user).toMatchSnapshot();
|
||||
});
|
||||
Reference in New Issue
Block a user