diff --git a/packages/synapse-bridge/src/patterns/DatePickerField/WarningMixin.ts b/packages/synapse-bridge/src/patterns/DatePickerField/WarningMixin.ts index a2edc48870..468c20debe 100644 --- a/packages/synapse-bridge/src/patterns/DatePickerField/WarningMixin.ts +++ b/packages/synapse-bridge/src/patterns/DatePickerField/WarningMixin.ts @@ -33,7 +33,7 @@ export default defineComponent({ this.warningMessages = this.warningRules .map((rule) => rule(value)) - .filter((result) => typeof result === 'string') + .filter((result) => typeof result === 'string') as string[] }, }, }) diff --git a/packages/synapse-bridge/src/rules/notAfterToday/tests/notAfterToday.spec.ts b/packages/synapse-bridge/src/rules/notAfterToday/tests/notAfterToday.spec.ts index 8b0da83edd..bc38689c78 100644 --- a/packages/synapse-bridge/src/rules/notAfterToday/tests/notAfterToday.spec.ts +++ b/packages/synapse-bridge/src/rules/notAfterToday/tests/notAfterToday.spec.ts @@ -2,7 +2,6 @@ import { notAfterTodayFn } from '@/rules/notAfterToday/index.ts' import dayjs from 'dayjs' import { defaultErrorMessages } from '@/rules/notAfterToday/locales' import { it, describe, expect } from 'vitest' -import { formatDateToDDMMYYYYFn } from '../' const DATE_FORMAT = 'DD/MM/YYYY' @@ -28,9 +27,4 @@ describe('notAfterTodayFn', () => { it('returns true when value is today', () => { expect(notAfterToday(today)).toBe(true) }) - - it('returns date in DD/MM/YYYY format', () => { - const date = new Date('2021-01-01') - expect(formatDateToDDMMYYYYFn(date)).toBe('01/01/2021') - }) }) diff --git a/packages/synapse-bridge/src/rules/notBeforeToday/tests/notBeforeToday.spec.ts b/packages/synapse-bridge/src/rules/notBeforeToday/tests/notBeforeToday.spec.ts index 99f7bb35d4..4eb355f0fa 100644 --- a/packages/synapse-bridge/src/rules/notBeforeToday/tests/notBeforeToday.spec.ts +++ b/packages/synapse-bridge/src/rules/notBeforeToday/tests/notBeforeToday.spec.ts @@ -1,6 +1,6 @@ import dayjs from 'dayjs' -import { notBeforeToday, notBeforeTodayFn, formatDateToDDMMYYYY } from '../' +import { notBeforeToday, notBeforeTodayFn } from '../' import { describe, it, expect } from 'vitest' const DATE_FORMAT = 'DD/MM/YYYY' @@ -33,9 +33,4 @@ describe('notBeforeToday', () => { it('returns true when value is today', () => { expect(notBeforeToday(today)).toBe(true) }) - - it('returns date in DD/MM/YYYY format', () => { - const date = new Date('2021-01-01') - expect(formatDateToDDMMYYYY(date)).toBe('01/01/2021') - }) })