Added A+ tests, which aint passing yet#1
Conversation
|
I had no idea there was a package for A+ Promises. This would have saved me so much time! My intention wasn't to be A+ compliant, but really just to show off the techniques used in the article. This code isn't mean to to be used in any project. Though it would be nice to have this A+ compliant. I will figure out how to merge this when I can get all tests passing. Thanks for this! |
Yeah - sure, I got that. Just thought it was really fun and I've checked if it is A+ compliant implementation. 😃 Btw. atm its one of the smallest Promise implementations out there |
|
Part of me wants to fix it. The other part of me doesn't want people to actually use this. lol. |
|
Who's talking about using it? XD Anyway - this code is very much usable even right now, relying on most of the behaviours that need to be 'fixed' to be A+ compliant is probably a code-smell anyway. |
I've played around with your code after reading your fun article and I was wondering if this is A+ compliant implementation, so I've checked it and it seems it isn't.
It probably wasn't even ever a goal, but I've done some work with the setup and you might want to push this forward if you like.
Next failing test is caused by this line - onFulfilled function shouldn't be called right away, but rather in the next tick. Couldn't figure out at the moment how to approach this correctly here as I do not understand your implementation fully and it is not as trivial as just wrapping the call to
state.thenwithimmediate, because the result needs to be stored instate.right.