chore: fix and migrate unit tests to vitest
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { describe, expect, it } from "@jest/globals"
|
||||
import { describe, expect, it } from "vitest"
|
||||
|
||||
import { getGroupedOpeningHours } from "./utils"
|
||||
|
||||
@@ -7,7 +7,7 @@ import type { IntlShape } from "react-intl"
|
||||
|
||||
// Mock IntlShape for testing
|
||||
const mockIntl = {
|
||||
formatMessage: ({ id }: { id: string }) => {
|
||||
formatMessage: ({ defaultMessage }: { defaultMessage: string }) => {
|
||||
const messages: Record<string, string> = {
|
||||
Monday: "Monday",
|
||||
Tuesday: "Tuesday",
|
||||
@@ -19,7 +19,7 @@ const mockIntl = {
|
||||
Closed: "Closed",
|
||||
"Always open": "Always open",
|
||||
}
|
||||
return messages[id] || id
|
||||
return messages[defaultMessage] || defaultMessage
|
||||
},
|
||||
} as IntlShape
|
||||
|
||||
|
||||
Reference in New Issue
Block a user