MakeAWishFoundation/SwiftyMocky

When Using Promises, mocked layer return the result after the Verify is called.

Opened this issue · 1 comments

Couldn't find anyone mentioning this.

But basically, the mocked layer is expecting a Promise.

First I use the "Given" to fill in what should be the result to that mocked layer.

Then I can the implementation.

As verification, I "Verify" if my delegate method is called.

The problem is that my "Given" mocked layer is only being resolved after my "Verify" is called, so my test always fails.

Not sure why "Given" is taking "long" to respond.

Also not sure if is possible to add "wait" to my Given so it would wait until the response come.

Hi, can you send an example of the test? And something resembling mocked method? That would it easier for us to check for the issue.