LukaJCB / rxscala-js

Scala idiomatic wrapper for RxJS
http://lukajcb.github.io/rxscala-js/latest/api/rxscalajs/Observable.html
47 stars 7 forks source link

Add Creator union type #4

Closed Narigo closed 8 years ago

Narigo commented 8 years ago

Sorry about the whitespace formatting. If you want to keep the whitespaces, I need to check how to get rid of the git setting.

Anyways, if you have an idea about how to test this, I can try to add something.

LukaJCB commented 8 years ago

Also you can just add a test that creates an Observable with a Dispose function and see if it's being called, without everything crashing. :)

Narigo commented 8 years ago

I've added a test after reading a bit more about µtest and hopefully fixed the typing issue you've mentioned. I was unsure if it's working, but when setting x = false in the disposer function in the test, it showed a red test, so I guess it should be okay :)

Edit: This is only a test for the WrapperTest. Do you need a FacadeTest as well?

Narigo commented 8 years ago

Added another test for ObservableFacade. Wasn't as hard as I expected it to be :)

I guess someone can make the typing stuff look better than what I did, but I'm not really getting my head around how the union type etc works yet...

LukaJCB commented 8 years ago

Awesome, looks good to me!