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
use await expect { await foo.bar() } == "Hello World" instead. expect with async closures does not have a version that uses autoclosures (the compiler would always assume you want the autoclosure is async, and thus raise compiler errors if you use Nimble in a synchronous context - I don't know if this has since been fixed).
What did you do?
Following the Documentation, I wanted to write a Quickspec that tests an async function.
I've boiled it down to this minimal reproducible example:
The documentation says that when using Quick, there's no need to do anything to provide an async context - so I didn't.
What did you expect to happen?
I expected this to work as in the documentation.
What actually happened instead?
The code does not compile:
However, adding an additional pair of curly brackets fixes the build error:
So I guess either the async versions of
expect
should be corrected to match the documentation or the other way around.Environment
List the software versions you're using:
Please also mention which package manager you used and its version. Delete the
other package managers in this list:
Project that demonstrates the issue
See the code example above.
The text was updated successfully, but these errors were encountered: