So I have async method that I want to tes (note that I use UniTaskt:
public async UniTask LoadGameSceneAsync(...) { ... }
And here’s my test method:
[Test]
public async Task NewTestScriptSimplePasses()
{
await sceneLoader.LoadGameSceneAsync(...);
...
}
But when I try to run it I get:
Method has non-void return value, but no result is expected
I can’t debug it, because I guess it fails even before it runs.
If I change return type of test method from Task
to void
it says:
NUnit. Async test method should return Task or Task<T>
But test runs and I can debug it (even though it behaves incorrectly).
So, what I can do to test my async UniTask method?