Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -709,21 +709,17 @@ struct AppShellUpcomingCapTests {
@MainActor
func upcomingEventsCappedAt6() async throws {
let now = Date()
let dtos = (0 ..< 9).map { idx in
EKEventDTO(
let dtos = (0 ..< 9).map { idx -> EKEventDTO in
let start: TimeInterval = Double(idx + 1) * 600
let end: TimeInterval = start + 3600
return EKEventDTO(
eventIdentifier: "ev-cap-\(idx)",
calendarItemIdentifier: "ci-cap-\(idx)",
calendarItemExternalIdentifier: "ext-cap-\(idx)",
occurrenceDate: now.addingTimeInterval(
Double(idx + 1) * 600
),
occurrenceDate: now.addingTimeInterval(start),
title: "Cap Event \(idx)",
startDate: now.addingTimeInterval(
Double(idx + 1) * 600
),
endDate: now.addingTimeInterval(
Double(idx + 1) * 600 + 3600
),
startDate: now.addingTimeInterval(start),
endDate: now.addingTimeInterval(end),
isAllDay: false,
location: "https://zoom.us/j/cap\(idx)",
url: nil,
Expand Down
10 changes: 6 additions & 4 deletions Packages/BiscottiKit/Tests/HomeUITests/HomeViewModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ struct HomeViewModelStateTests {
@MainActor
func homeShowsUpcomingPreview() async throws {
let now = Date()
let dtos = (0 ..< 8).map { idx in
EKEventDTO(
let dtos = (0 ..< 8).map { idx -> EKEventDTO in
let start: TimeInterval = Double(idx + 1) * 600
let end: TimeInterval = start + 3600
return EKEventDTO(
eventIdentifier: "ev-\(idx)",
calendarItemIdentifier: "ci-\(idx)",
calendarItemExternalIdentifier: "ext-\(idx)",
occurrenceDate: now,
title: "Event \(idx)",
startDate: now.addingTimeInterval(Double(idx + 1) * 600),
endDate: now.addingTimeInterval(Double(idx + 1) * 600 + 3600),
startDate: now.addingTimeInterval(start),
endDate: now.addingTimeInterval(end),
isAllDay: false,
location: "https://zoom.us/j/\(idx)",
url: nil,
Expand Down
Loading