stackp/promisejs — pull request #8 by hell03610 (2012-11-18 20:54:19+00:00)
Title: Timeout Fixed and test added

I wrote a test tor the timeout functionality and also fixed some bugs accessing the timeout default value and error timeout constant.

I've seen you don't use libraries for your test, so I've created a spy for XHR object and i simulated a delay with a while...values for testing the timeout are small, as if i use big ones (like default ones) other test fail as javascript is only one thread. It might be interesting to see if those test can be done with sinon.js and its fakeTimer, but as the library is so small and not many test are needed, i think it's just fine.

Please, have a look at the changes and merge with master, i'd love to use the minify version in a phonegap app.

Thanks!