Fixed bug where the results of promises filfulled through the when method are an object instead of an array
Added test to ensure the type of result is an Array, when using Promise.when