You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I also needed this in the .testTargetdependencies section, which isn't mentioned in the README, probably because not everyone is using this with a testTarget:
Without the expectation code, the tests would always pass because they wouldn't wait.
I realize not everyone is using this within an XCTestCase, but I just wanted to point out the expectation syntax since I noticed it differed from what I see in
The _ = firstly { assignment is to silence the warning result of call to 'done(on:flags:_:)' is unused. I don't know if that is the best way to handle it, but it worked for me.
Anyway, I'm not a Swift expert. There may be better ways to handle this. Just posting here in case this helps someone in the future.
I'm coming from the JS ecosystem, so it was disappointing to learn that Promises are not forward compatible with async/await in Swift. Bummer. Maybe there will be an async/await version of Marionette sometime?
The text was updated successfully, but these errors were encountered:
Hey folks,
I used this today with:
I noted the following changes:
I used SwiftPM, so I needed this from the README (note the alpha version):
However, I also needed this in the
.testTarget
dependencies
section, which isn't mentioned in the README, probably because not everyone is using this with atestTarget
:I had a ton of trouble figuring out the test case syntax as it appears some things have changed. This is what I ended up with:
Without the
expectation
code, the tests would always pass because they wouldn't wait.I realize not everyone is using this within an
XCTestCase
, but I just wanted to point out theexpectation
syntax since I noticed it differed from what I see inMarionette/Tests/WaitTests.swift
Line 53 in 3c0699e
The
_ = firstly {
assignment is to silence the warningresult of call to 'done(on:flags:_:)' is unused
. I don't know if that is the best way to handle it, but it worked for me.Anyway, I'm not a Swift expert. There may be better ways to handle this. Just posting here in case this helps someone in the future.
I'm coming from the JS ecosystem, so it was disappointing to learn that
Promise
s are not forward compatible withasync/await
in Swift. Bummer. Maybe there will be anasync/await
version ofMarionette
sometime?The text was updated successfully, but these errors were encountered: