Skip to content

Commit

Permalink
Fix broken tests in swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
younata committed Oct 14, 2024
1 parent 9c13be6 commit 259705b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/NimbleTests/AsyncAwaitTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ final class AsyncAwaitTest: XCTestCase { // swiftlint:disable:this type_body_len
// However, the functionality actually works as you'd expect it to, you're just expected to tag things to use the main actor.
@Sendable func isMainThread() -> Bool { Thread.isMainThread }

await expecta(isMainThread()).toEventually(beTrue())
await expecta(isMainThread()).toEventuallyNot(beFalse())
await expecta(isMainThread()).toAlways(beTrue(), until: .seconds(1))
await expecta(isMainThread()).toNever(beFalse(), until: .seconds(1))
await expect(isMainThread).toEventually(beTrue())
await expect(isMainThread).toEventuallyNot(beFalse())
await expect(isMainThread).toAlways(beTrue(), until: .seconds(1))
await expect(isMainThread).toNever(beFalse(), until: .seconds(1))
}

func testToEventuallyWithCustomDefaultTimeout() async {
Expand Down

0 comments on commit 259705b

Please sign in to comment.