Skip to content

Commit 095b215

Browse files
committed
chore: testing ci
1 parent 3135fb2 commit 095b215

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/timeslice/hooks/use-segment-navigation/__tests__/date-adjustments.test.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,34 @@ describe('Date Adjustments', () => {
276276
newDateRange.endDate!,
277277
timeZone
278278
).segments
279+
280+
// Debugging logs
281+
const criticalDateForLog = newDateRange.endDate! // This is the new endDate after adjustment
282+
const includeYearForLog =
283+
newDateRange.startDate!.getFullYear() !==
284+
newDateRange.endDate!.getFullYear()
285+
const optionsForLog: Intl.DateTimeFormatOptions = {
286+
month: 'short',
287+
day: 'numeric',
288+
hour: 'numeric',
289+
minute: '2-digit',
290+
hour12: true,
291+
timeZone: timeZone, // Use the test's timeZone variable
292+
...(includeYearForLog ? { year: 'numeric' } : {})
293+
}
294+
const formatterForLog = new Intl.DateTimeFormat('en-US', optionsForLog)
295+
const rawPartsForLog = formatterForLog.formatToParts(criticalDateForLog)
296+
console.log(
297+
'CI/Local rawPartsForLog for criticalDate:',
298+
JSON.stringify(rawPartsForLog, null, 2)
299+
)
300+
console.log(
301+
'CI/Local newSegments:',
302+
JSON.stringify(newSegments, null, 2)
303+
)
304+
console.log('CI/Local selStart:', selStart, 'selEnd:', selEnd)
305+
// End Debugging logs
306+
279307
for (const seg of newSegments) {
280308
if (
281309
seg.type === 'minute' &&

0 commit comments

Comments
 (0)