stretchr / sdk-js

HTML5 and JavaScript SDK for Stretchr
http://docs.stretchr.com/sdks/javascript.md
3 stars 0 forks source link

Automatically handle auth parameter if it's present #11

Closed matryer closed 10 years ago

matryer commented 10 years ago

Client.init should:

matryer commented 10 years ago

Note on TDDing this

Have a method called Stretchr.args that gets the URL parameters. Then you can override this in your test code to make it return what you like. The real code should read real arguments.

NOTE: The Stretchr.args method might well be difficult to test.

mazondo commented 10 years ago

Interesting, should have read this first. To do this TDD I used window.history.pushState to change the url params without reloading the page, then I can just make sure it sees what I want it to see, but I've only written a single high level test because this is blocked until we work out #13

Going to leave this as is until we chat about #13, as it will change the implementation. I like the Stretchr.args though, and pushState will let us test it.

matryer commented 10 years ago

Maybe I should have read this before I wrote my TDD thing… I like this approach.

On 26 Sep 2013, at 23:42, Ryan notifications@github.com wrote:

Interesting, should have read this first. To do this TDD I used window.history.pushState to change the url params without reloading the page, then I can just make sure it sees what I want it to see, but I've only written a single high level test because this is blocked until we work out #13

Going to leave this as is until we chat about #13, as it will change the implementation. I like the Stretchr.args though, and pushState will let us test it.

— Reply to this email directly or view it on GitHub.

matryer commented 10 years ago

Is this done then @mazondo ?

mazondo commented 10 years ago

ummm, I think? I don't know

mazondo commented 10 years ago

yes, it is - kind of. The only missing piece has been moved to #15