Skip to content

Commit

Permalink
Update src/components/BusinessHours/MucBusinessHours.test.ts
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
FabianWilms and coderabbitai[bot] authored Dec 2, 2024
1 parent 6289f36 commit cc524e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/BusinessHours/MucBusinessHours.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,13 @@ describe("BusinessHoursToggle", () => {
});
const today = new Date().toLocaleDateString("de-DE", { weekday: "short" });
const todaysHours = businessHours.find((bh) => bh.weekDay === today);
if (todaysHours) {
if (todaysHours && todaysHours.openingHours.length > 0) {
const hoursText = todaysHours.openingHours
.map((time) => `${time.from} - ${time.to}`)
.join(", ");
expect(wrapper.html()).toContain(hoursText);
} else {
expect(wrapper.html()).toContain("geschlossen");
}
});

Expand Down

0 comments on commit cc524e2

Please sign in to comment.