Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing marble tests #17

Open
jmfayard opened this issue Jan 18, 2018 · 13 comments
Open

Writing marble tests #17

jmfayard opened this issue Jan 18, 2018 · 13 comments

Comments

@jmfayard
Copy link

jmfayard commented Jan 18, 2018

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

@RubyLichtenstein
Copy link
Owner

Looks interesting, thank you.

@RubyLichtenstein
Copy link
Owner

Hi @jmfayard

Do you want to work on this feature?

@jmfayard
Copy link
Author

jmfayard commented Feb 4, 2018

@RubyLichtenstein I can contribute what I already did. I fear I don't understand enough rxjava to make it right by myself though

@RubyLichtenstein
Copy link
Owner

Great, so please fork the project and add what you all ready done

What about porting the JavaScript code to kotlin code?

@jmfayard
Copy link
Author

jmfayard commented Feb 4, 2018

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.

@RubyLichtenstein
Copy link
Owner

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 :)

@RubyLichtenstein
Copy link
Owner

Most of the code should be the same

@jmfayard
Copy link
Author

jmfayard commented Feb 4, 2018

I meant stealing in a positive sense, like T.S. Eliott quote Good artists copy; great artists steal.

@jmfayard
Copy link
Author

jmfayard commented Feb 4, 2018

#19

@RubyLichtenstein
Copy link
Owner

Great job!

I'll review it as soon as I have time

@RubyLichtenstein
Copy link
Owner

So the work you did is not based on the js implementation?

@jmfayard
Copy link
Author

jmfayard commented Feb 6, 2018

no, I didn't have the code of the js implementation at that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants