mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 13:57:35 +00:00
LibWeb: Add more document tests, add comment, text and mixin tests
Also adds a TypeScript definition file for the test runner object.
This commit is contained in:
parent
8b807e65d7
commit
c2a2552e46
18 changed files with 224 additions and 15 deletions
15
Libraries/LibWeb/Tests/DOM/Comment.js
Normal file
15
Libraries/LibWeb/Tests/DOM/Comment.js
Normal file
|
@ -0,0 +1,15 @@
|
|||
loadPage("file:///home/anon/web-tests/Pages/Comment.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("Basic functionality", () => {
|
||||
const comment = document.body.firstChild.nextSibling;
|
||||
expect(comment).not.toBeNull();
|
||||
|
||||
// FIXME: Add this in once Comment's constructor is implemented.
|
||||
//expect(comment).toBeInstanceOf(Comment);
|
||||
|
||||
expect(comment.nodeName).toBe("#comment");
|
||||
expect(comment.data).toBe("This is a comment");
|
||||
expect(comment).toHaveLength(17);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue