Skip to content

Commit

Permalink
Add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
cihancimen committed Oct 30, 2024
1 parent ed3c5f3 commit 62e75d5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions __tests__/retail_calendar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ describe('RetailCalendar', () => {
})

it('addLeapWeekTo is respected for 0..11 values', () => {
console.log(new Date())
const range = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
for (const addLeapWeekToMonth of range) {
const calendar = new RetailCalendarFactory({
Expand All @@ -82,6 +83,7 @@ describe('RetailCalendar', () => {
const expectedMonthLengthsInWeeks = [4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 4, 5]
for (const monthIndex of range) {
if (monthIndex === addLeapWeekToMonth) {
console.log(monthIndex, expectedMonthLengthsInWeeks[monthIndex], calendar.weeks.length)
expect(calendar.months[monthIndex].weeks.length).toEqual(expectedMonthLengthsInWeeks[monthIndex] + 1)
} else {
expect(calendar.months[monthIndex].weeks.length).toEqual(expectedMonthLengthsInWeeks[monthIndex])
Expand Down

0 comments on commit 62e75d5

Please sign in to comment.