Попробуйте так:
function runTest(){
let promises = [];
for (let i = 0; i<10; i++){
const getPromise = i => new Promise(resolve => {
setTimeout(()=>{
console.log(i);
resolve();
}, 100);
});
promises.push(
getPromise(i)
);
}
Promise.all(promises).then(() => {
console.log("Done");
});
}