From be2356724eff39ceef6176d3f840f0be33330b8b Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Thu, 6 Apr 2023 16:33:31 +0530 Subject: [PATCH] fix: Time specs (#6841) --- app/javascript/dashboard/mixins/specs/time.spec.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/javascript/dashboard/mixins/specs/time.spec.js b/app/javascript/dashboard/mixins/specs/time.spec.js index 4df849efc..56b70ec8a 100644 --- a/app/javascript/dashboard/mixins/specs/time.spec.js +++ b/app/javascript/dashboard/mixins/specs/time.spec.js @@ -11,9 +11,8 @@ describe('#messageStamp', () => { describe('#messageTimestamp', () => { it('should return the message date in the specified format if the message was sent in the current year', () => { - const now = new Date(); - expect(TimeMixin.methods.messageTimestamp(now.getTime() / 1000)).toEqual( - 'Apr 5, 2023' + expect(TimeMixin.methods.messageTimestamp(1680777464)).toEqual( + 'Apr 6, 2023' ); }); it('should return the message date and time in a different format if the message was sent in a different year', () => {