Yep. AI rewrote the whole thing.

This commit is contained in:
2026-03-13 03:24:24 +11:00
parent e4719cb9f4
commit fe6c7d8c12
47 changed files with 5348 additions and 1182 deletions

View File

@@ -0,0 +1,42 @@
import XCTest
@testable import CommandNotch
@MainActor
final class AppSettingsControllerTests: XCTestCase {
func testTerminalSessionConfigurationIncludesShellPath() {
let store = InMemoryAppSettingsStore()
var settings = AppSettings.default
settings.terminal.shellPath = "/opt/homebrew/bin/fish"
store.storedSettings = settings
let controller = AppSettingsController(store: store)
XCTAssertEqual(controller.terminalSessionConfiguration.shellPath, "/opt/homebrew/bin/fish")
}
func testTerminalSizePresetsDecodeFromTypedSettings() {
let store = InMemoryAppSettingsStore()
let presets = [
TerminalSizePreset(name: "Wide", width: 960, height: 420, hotkey: .cmdShiftDigit(4))
]
var settings = AppSettings.default
settings.terminal.sizePresetsJSON = TerminalSizePresetStore.encodePresets(presets)
store.storedSettings = settings
let controller = AppSettingsController(store: store)
XCTAssertEqual(controller.terminalSizePresets, presets)
}
}
private final class InMemoryAppSettingsStore: AppSettingsStoreType {
var storedSettings = AppSettings.default
func load() -> AppSettings {
storedSettings
}
func save(_ settings: AppSettings) {
storedSettings = settings
}
}