Skip to content

Instantly share code, notes, and snippets.

@matthiasg
Created October 12, 2015 09:49
Show Gist options
  • Save matthiasg/b793670953c740e28a4c to your computer and use it in GitHub Desktop.
Save matthiasg/b793670953c740e28a4c to your computer and use it in GitHub Desktop.
ES7 Async test for sourcemaps
asyncTest().then(()=>console.log('done'));
async function asyncTest(){
let asyncTest = await test();
}
async function test(){
var t = new Array(10);
for (var i = 0; i < t.length; i++) {
test2();
}
return await wait(1000);
}
function wait(time){
return new Promise((resolve,reject)=>{
setTimeout(resolve,time);
});
}
function test2(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment