mirror of
https://github.com/swc-project/swc.git
synced 2024-12-24 06:05:02 +03:00
test(es/compat): Add a test for a fixed issue (#5672)
This commit is contained in:
parent
1fa9cacad6
commit
1ae539aac5
@ -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()
|
Loading…
Reference in New Issue
Block a user