From 878c81bfa7ea29fda63ef57ad7be55d6a90ce452 Mon Sep 17 00:00:00 2001 From: kenobi Date: Thu, 13 Jul 2023 22:46:03 +0200 Subject: [PATCH] linting --- tests/helpers/date.test.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/helpers/date.test.ts b/tests/helpers/date.test.ts index 52f7ff9..b1b5e57 100644 --- a/tests/helpers/date.test.ts +++ b/tests/helpers/date.test.ts @@ -1,16 +1,15 @@ -import { GuildScheduledEvent } from "discord.js" import { createDateStringFromEvent } from "../../server/helper/dateHelper" import MockDate from 'mockdate' beforeAll(() => { - MockDate.set('01-01-2023') + MockDate.set('01-01-2023') }) -function getTestDate(date: string): GuildScheduledEvent { - return { scheduledStartAt: new Date(date) } +function getTestDate(date: string): Date { + return new Date(date) } test('createDateStringFromEvent - correct formatting', () => { - expect(createDateStringFromEvent(getTestDate('01-01-2023 12:30'), "")).toEqual('heute um 12:30') - expect(createDateStringFromEvent(getTestDate('01-02-2023 12:30'), "")).toEqual('am Montag 02.01 um 12:30') - expect(createDateStringFromEvent(getTestDate('01-03-2023 12:30'), "")).toEqual('am Dienstag 03.01 um 12:30') + expect(createDateStringFromEvent(getTestDate('01-01-2023 12:30'), "")).toEqual('heute um 12:30') + expect(createDateStringFromEvent(getTestDate('01-02-2023 12:30'), "")).toEqual('am Montag 02.01 um 12:30') + expect(createDateStringFromEvent(getTestDate('01-03-2023 12:30'), "")).toEqual('am Dienstag 03.01 um 12:30') })