mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[test] Rewritten test for fetch to free Promise
This commit is contained in:
parent
a13ddcce89
commit
132c72c123
@ -14,9 +14,20 @@ async function getData() {
|
||||
}
|
||||
}
|
||||
console.error("fetch.html");
|
||||
var ex = 0;
|
||||
|
||||
getData().then(text => {
|
||||
console.assert(text === 'Hello', 'hello');
|
||||
console.exit();
|
||||
ex = 1;
|
||||
});
|
||||
|
||||
function loop()
|
||||
{
|
||||
if (ex == 1) {
|
||||
setTimeout(console.exit());
|
||||
} else {
|
||||
setTimeout(loop, 1);
|
||||
}
|
||||
}
|
||||
loop();
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user