chore(coverage): add redundant code to test coverage threshold

This commit is contained in:
Ali BARIN
2024-11-25 09:01:26 +00:00
parent 09335fcd79
commit f36155f3a5
+12
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();