Skip to content

Commit a202457

Browse files
committed
test: add a test case
1 parent bae0424 commit a202457

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -383,3 +383,13 @@ Deno.test("Component with narrower HTML element type works", () => {
383383

384384
register(Component, randomName());
385385
});
386+
387+
Deno.test("Returned string from Component is rendered", () => {
388+
const name = randomName();
389+
document.body.innerHTML = `<div class="${name}"><div>`;
390+
function Component() {
391+
return "<p>hello</p>";
392+
}
393+
register(Component, name);
394+
assertEquals(queryByClass(name).innerHTML, "<p>hello</p>");
395+
});

0 commit comments

Comments
 (0)