问题标签 [rxtest]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
80 浏览

swift - RxSwift/RxTest How to test async function with Observable return

I'm quite new to RxSwift and I trying to create some unit tests. In this case I want to test If the fetch objects from Realtime database Firebase is occurring correctly.

The problem is the return of firebase is async and the way i'm trying the test is being completed before the return.

Obs: I tried to use XCTest expectation but I don't know if had implemented incorrectly or if it doesn't really work

Thank you!