swift-spyable icon indicating copy to clipboard operation
swift-spyable copied to clipboard

Swift macro that simplifies and automates the process of creating spies for testing

Results 14 swift-spyable issues
Sort by recently updated
recently updated
newest added

Thank you for creating this library 🤝 **Is your feature request related to a problem? Please describe.** Coucnrrency compliance is required in `Xcode 15.3` or later. Compliance with `Sendable` will...

enhancement

Thank you for creating this library 🤝 **Describe the bug** Regarding `any`, which will definitely be implemented in swift in the future -> https://github.com/apple/swift-evolution/blob/main/proposals/0335-existential-any.md We are unable to conduct tests...

bug

**Is your feature request related to a problem? Please describe.** A spy is currently unable to be generated for `init` requirements. Any protocol with an `init` requirement will not synthesize...

Today, the following code ```swift @Spyable protocol ServiceProtocol { func foo() -> T } ``` will produce Spy that doesn't compile ```swift class ServiceProtocolSpy: ServiceProtocol { var fooCallsCount = 0...

- Allows protocols with *any* modifiers, like `public`, `fileprivate` etc. to inherit this access on the spy and all the generated members. This is done by taking the `modifiers` on...

Currently I'm super happy to use this macro, it allows me to drop third party dependency an the fact that mocks are generated in the main target allows me to...

**Is your feature request related to a problem? Please describe.** If you use the macro on a public protocol declaration from module A and you have a unit test in...

**Is your feature request related to a problem? Please describe.** Currently the generated spy doesn't handle generic functions: ![Screenshot 2023-11-01 at 12 53 36](https://github.com/Matejkob/swift-spyable/assets/1481350/5a0af8b2-4a9a-48d0-a96f-8287f6c0bcbd) **Describe the solution you'd like** In...

enhancement

``` @Spyable internal protocol MyHapticsProtocol { func send(_ style: UIImpactFeedbackGenerator.FeedbackStyle) func send(_ type: UINotificationFeedbackGenerator.FeedbackType) } ``` results in a bunch `Invalid redeclaration of ...` warnings

bug

**Is your feature request related to a problem? Please describe.** Given that it is currently not possible to generate a spy from a pre-existing protocol, it may be useful to...

enhancement