Skip to content

Commit

Permalink
apply swiftformat
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavFitz committed Jan 25, 2023
1 parent 8c1575d commit a6a6298
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Tests/InstantSearchInsightsTests/Unit/EventsProcessorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,17 @@ class EventsProcessorTests: XCTestCase {

waitForExpectations(timeout: 10, handler: nil)
}

func testEventsFilteringException() throws {
let mockService = MockEventService<Int>()
let packageCapacity = 10
let queue = DispatchQueue(label: "test queue")

let storage = TestPackageStorage<Int>()
storage.store([try .init(items: [1, 2], capacity: 2), try .init(items: [3, 4], capacity: 2)])

let acceptEvent: (Int) -> Bool = { _ in false }



let eventsProcessor = EventProcessor(service: mockService,
storage: storage,
packageCapacity: packageCapacity,
Expand All @@ -241,15 +240,14 @@ class EventsProcessorTests: XCTestCase {

let exp = expectation(description: "send events")
exp.isInverted = true

mockService.didSendEvents = { events in
XCTAssertTrue(events.allSatisfy(acceptEvent))
exp.fulfill()
}

eventsProcessor.flush()

waitForExpectations(timeout: 10, handler: nil)
}

}

0 comments on commit a6a6298

Please sign in to comment.