Fixed issues encountered in the unit tests target after the project transitioned to Swift 6 and strict concurrency.

This commit is contained in:
2026-02-11 19:15:56 +01:00
parent e9e091c4d5
commit 546985bd98
6 changed files with 24 additions and 18 deletions
@@ -4,6 +4,7 @@ import Testing
@testable import Todos
@MainActor
@Suite("TodoFetchDescriptor+Inits extension tests")
struct TodoFetchDescriptor_InitsTests {
@@ -11,9 +12,8 @@ struct TodoFetchDescriptor_InitsTests {
@Test(
"initialization when empty tasks",
arguments: TodoGroup.allCases
arguments: [TodoGroup.today, .upcoming, .overdue, .completed]
)
@MainActor
func initializationWhenEmptyTasks(for group: TodoGroup) throws {
// GIVEN
let container = try modelContainer
@@ -32,9 +32,8 @@ struct TodoFetchDescriptor_InitsTests {
@Test(
"initialization with show completed disabled",
arguments: TodoGroup.allCases
arguments: [TodoGroup.today, .upcoming, .overdue, .completed]
)
@MainActor
func initializationWithNoShowCompleted(for group: TodoGroup) throws {
// GIVEN
let container = try modelContainer
@@ -70,9 +69,8 @@ struct TodoFetchDescriptor_InitsTests {
@Test(
"initialization with show completed enabled",
arguments: TodoGroup.allCases
arguments: [TodoGroup.today, .upcoming, .overdue, .completed]
)
@MainActor
func initializationWithShowCompleted(for group: TodoGroup) throws {
// GIVEN
let container = try modelContainer