add test for promise chaining

returned promises are not resolved before chained callbacks are called