DevYeom / OneWay

A Swift library for state management with unidirectional data flow.
https://swiftpackageindex.com/DevYeom/OneWay/2.9.0/documentation/oneway
MIT License
78 stars 8 forks source link

Add a test helper function for asynchronous tests #53

Closed DevYeom closed 11 months ago

DevYeom commented 11 months ago

Related Issues 💭

Description 📝

Additional Notes 📚

// AS-IS
while await sut.state.count < 4 {
    await Task.yield()
}
let state = await sut.state
XCTAssertEqual(state.count, 4)

// TO-DO
await expect { await sut.state.count == 4 }

Checklist ✅