update test

This commit is contained in:
Halil Durak
2026-01-22 16:24:01 +03:00
parent b864342823
commit de06d2b18b

View File

@@ -103,6 +103,7 @@
const img = document.createElement("img"); const img = document.createElement("img");
let count = 0; let count = 0;
img.addEventListener("load", ({ bubbles, cancelBubble, cancelable, composed, isTrusted, target }) => { img.addEventListener("load", ({ bubbles, cancelBubble, cancelable, composed, isTrusted, target }) => {
testing.expectEqual(true, count < 3);
count++; count++;
testing.expectEqual(false, bubbles); testing.expectEqual(false, bubbles);
@@ -118,7 +119,7 @@
testing.expectEqual("https://cdn.lightpanda.io/website/assets/images/docs/hn.png", img.src); testing.expectEqual("https://cdn.lightpanda.io/website/assets/images/docs/hn.png", img.src);
} }
// Should work since we synchronously exeute the listener. // Make sure count is incremented asynchronously.
testing.expectEqual(3, count); testing.expectEqual(0, count);
} }
</script> </script>