Compare commits

...

1 Commits

Author SHA1 Message Date
Ali BARIN
f36155f3a5 chore(coverage): add redundant code to test coverage threshold 2024-11-25 09:01:26 +00:00

View File

@@ -366,6 +366,18 @@ class User extends Base {
return now.getTime() - sentAt.getTime() < fourHoursInMilliseconds;
}
toTestTestCoverage() {
if (!this.resetPasswordTokenSentAt) {
return false;
}
const sentAt = new Date(this.resetPasswordTokenSentAt);
const now = new Date();
const fourHoursInMilliseconds = 1000 * 60 * 60 * 4;
return now.getTime() - sentAt.getTime() < fourHoursInMilliseconds;
}
async sendInvitationEmail() {
await this.generateInvitationToken();