Swift Concurrency Support #47
-
Hello! I was wondering what is the best way to use this library with Swift Concurrency async/await functions? When testing in a standard XCTestCase, I can mark test and I can use |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hrm, this is an interesting question. So I'll be clear, the library wasn't designed with async/await in mind at all. It'd be possible to add closures to steps that'd be async/await compatible, for that matter it'd be good if the existing closures would be updated to support throwing errors as well. The design for this may take me a bit to nail down. I can't give you great advice on making this work right this second but I'll tell you that CucumberSwift steps execute synchronously, It might be possible for you to build something yourself that utilizes XCTWaiter() and an async closure to kind of hack in the functionality. I'm happy to add it to the backlog of ideas, though. It's a totally reasonable feature request. |
Beta Was this translation helpful? Give feedback.
Hrm, this is an interesting question. So I'll be clear, the library wasn't designed with async/await in mind at all. It'd be possible to add closures to steps that'd be async/await compatible, for that matter it'd be good if the existing closures would be updated to support throwing errors as well.
The design for this may take me a bit to nail down. I can't give you great advice on making this work right this second but I'll tell you that CucumberSwift steps execute synchronously, It might be possible for you to build something yourself that utilizes XCTWaiter() and an async closure to kind of hack in the functionality.
I'm happy to add it to the backlog of ideas, though. It's a totally r…