Brightify / Cuckoo

Boilerplate-free mocking framework for Swift!
MIT License
1.67k stars 174 forks source link

Support effectful properties #460

Closed kabiroberai closed 1 year ago

kabiroberai commented 1 year ago

This PR allows Cuckoo to properly handle read-only properties with getters marked as async or throws, as specified by SE-0310.

Note that I'm not 100% sure I have all the availability annotations correct so lmk if there are any problems with that.

MatyasKriz commented 1 year ago

Regarding the availability annotations, the one used throughout the project for async is

@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)

So I think it's fine. 🙂

MatyasKriz commented 1 year ago

Looks good! Merging, thanks for the PR, @kabiroberai. 🙂