add test cases narrowing down the bug in promise.js