Skip to main content
Glama
AppCommandQuitValidationTests.swift1.43 kB
import Commander import PeekabooCore import Testing @testable import PeekabooCLI @Suite("AppCommand quit validation") @MainActor struct AppCommandQuitValidationTests { private func makeRuntime() -> CommandRuntime { CommandRuntime( configuration: .init(verbose: false, jsonOutput: true, logLevel: nil), services: PeekabooServices() ) } @Test("Rejects --all combined with --app") func rejectAllWithApp() async { var command = AppCommand.QuitSubcommand() command.all = true command.app = "Finder" let exitCode = await #expect(throws: ExitCode.self) { try await command.run(using: self.makeRuntime()) } #expect(exitCode == .failure) } @Test("Rejects --except without --all") func rejectExceptWithoutAll() async { var command = AppCommand.QuitSubcommand() command.except = "Finder" let exitCode = await #expect(throws: ExitCode.self) { try await command.run(using: self.makeRuntime()) } #expect(exitCode == .failure) } @Test("Rejects missing target when not using --all") func rejectMissingTarget() async { var command = AppCommand.QuitSubcommand() let exitCode = await #expect(throws: ExitCode.self) { try await command.run(using: self.makeRuntime()) } #expect(exitCode == .failure) } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/steipete/Peekaboo'

If you have feedback or need assistance with the MCP directory API, please join our Discord server