Skip to content

Commit

Permalink
chore: 사용자 toString override
Browse files Browse the repository at this point in the history
  • Loading branch information
potados99 committed Feb 28, 2022
1 parent 003887d commit 1d3e6dd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/entity/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ export default class User extends BaseBetterEntity {
log(`${this.toString()} FCM 토큰 설정 완료: ${token}`);
}

toString(): string {
return `[id가 ${this.id}이고 nickname이 ${this.nickname}인 사용자c]`;
}

async toResponse(): Promise<Infer<typeof UserResponseScheme>> {
return {
id: this.id,
Expand Down
11 changes: 11 additions & 0 deletions test/integrated/fcm.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {sendFcm} from '../../src/infrastructure/fcm';

describe('알림을 쏴보자', () => {
it('희지쿠쨩에서 알림 빵야><', async () => {
await sendFcm(
'e0B7-WajReiH9kuxYzKWu4:APA91bGmx72rtVi5OY_mEx18TAlwWlfs2ymcRHO7OXuevDTOBrZnIR4bz2fSQXaAsUKxF43WYMJG31fwDRn9kUn2_tizD2YfUgvLTiSoHmDjM4ng9zFWlXP6xFx9kzW3lLEHxrHTlkZO',
'아아 들리시면 1번',
'안들리시면 2번'
);
});
})

0 comments on commit 1d3e6dd

Please sign in to comment.