Add some tests and fix

This commit is contained in:
syuilo
2018-10-16 09:45:36 +09:00
parent 1c9c4af9f1
commit 4d6335ce9a
2 changed files with 344 additions and 2 deletions

View File

@ -26,7 +26,7 @@ export default async (user: IUser, note: INote, reaction: string) => new Promise
} catch (e) {
// duplicate key error
if (e.code === 11000) {
return res(null);
return rej('already reacted');
}
console.error(e);