migrate tests to new html runner

This commit is contained in:
Karl Seguin
2025-09-03 14:59:07 +08:00
parent 055f697340
commit a0374133cd
4 changed files with 52 additions and 48 deletions

View File

@@ -0,0 +1,22 @@
<script src="../testing.js"></script>
<div id=main></div>
<script id=webcomponents>
class LightPanda extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.append('connected');
}
}
window.customElements.define("lightpanda-test", LightPanda);
const main = document.getElementById('main');
main.appendChild(document.createElement('lightpanda-test'));
testing.expectEqual('<lightpanda-test>connected</lightpanda-test>', main.innerHTML)
testing.expectEqual('[object DataSet]', document.createElement('lightpanda-test').dataset.toString());
testing.expectEqual('[object DataSet]', document.createElement('lightpanda-test.x').dataset.toString());
</script>