Added Jest for testing both front and backend

This commit is contained in:
Jori Lallo
2016-09-09 01:35:39 -07:00
parent f4d1e62c13
commit 458735f341
21 changed files with 370 additions and 18 deletions

15
server/presenters/user.js Normal file
View File

@@ -0,0 +1,15 @@
const presentUser = (ctx, user) => {
ctx.cache.set(user.id, user);
return new Promise(async (resolve, _reject) => {
const data = {
id: user.id,
name: user.name,
username: user.username,
avatarUrl: user.slackData.image_192,
};
resolve(data);
});
};
export default presentUser;