Writing marble tests
Opened this issue · 13 comments
Hello,
what I lack when testing rx java things is the ability to quickly produce input observables.
RxJs has super cool functions to produce those
cold("--a--b--#")
: On frame 20 emit a, on frame 50 emit b, and on frame 80, error`
hot("-a-^-b--|")
: In a hot observable, on frame -20 emit a, then on frame 20 emit b, and on frame 50, complete.
https://github.com/ReactiveX/rxjs/blob/master/doc/writing-marble-tests.md
something like that in kotlin would be super valuable
Looks interesting, thank you.
Hi @jmfayard
Do you want to work on this feature?
@RubyLichtenstein I can contribute what I already did. I fear I don't understand enough rxjava to make it right by myself though
Great, so please fork the project and add what you all ready done
What about porting the JavaScript code to kotlin code?
We should steal their ideas, not their code. A lot of how it's implemented rely on how javascript works. e.g you don't have dynamic types on the JVM.
I think we should take what we can from the js code.
We shouldn't do work that already done
Its not stealing if its open source :)
Most of the code should be the same
I meant stealing in a positive sense, like T.S. Eliott quote Good artists copy; great artists steal.
Great job!
I'll review it as soon as I have time
So the work you did is not based on the js implementation?
no, I didn't have the code of the js implementation at that time.