test(es/compat): Add a test for a fixed issue (#5672)

This commit is contained in:
Donny/강동윤 2022-08-30 20:09:58 +09:00 committed by GitHub
parent 1fa9cacad6
commit 1ae539aac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,26 @@
const obj = {
a: 'a',
b: 'b',
c: 'c',
d: 'd',
}
const wait = n => new Promise(r => setTimeout(r, n))
const action = async () => {
for (let i in obj) {
// halt for a second
await wait(1000)
// this one is trouble
wait(1000).then(() => console.log(i))
}
console.log('done')
}
action()