Implemented the TaskListView view and its respective view model in the app target.

This commit is contained in:
javier committed 2026-02-10 16:15:17 +01:00
1 parent 1385f0df34
commit 8d3be6de14
4 files changed
+179

No files matched your search

@@ -0,0 +1,27 @@
import Foundation
import SwiftData
import Testing
@testable import Todos
@Suite("TaskList view model tests")
struct TaskListViewModelTests {
// MARK: Computed tests
@Test(
"navigationTitle returns correct title for each and every group",
arguments: TodoGroup.allCases
)
func navigationTitle(for group: TodoGroup) {
// GIVEN
let viewModel = TaskListView.ViewModel(group: group)
// WHEN
let title = viewModel.navigationTitle
// THEN
#expect(title == group.title)
}
}