import ParcelIPC import Testing @testable import ParcelApp @Suite("Fixture keyboard stimulus timestamp") struct AppFixtureTimestampTests { @Test func acceptedReplyIncludesExactTimestamp() throws { #expect( try AppFixtureKeyInput.reply(timestamp: 123_456_789) == .object([ "accepted": .bool(true), "event_timestamp_ns": .integer(123_456_789), ])) } @Test(arguments: [UInt64(0), UInt64.max]) func unavailableOrUnrepresentableTimestampFails(_ timestamp: UInt64) { #expect(throws: IPCError.self) { try AppFixtureKeyInput.reply(timestamp: timestamp) } } }