mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +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
Notes:
sideshowbarker
2024-07-19 03:28:13 +09:00
Author: https://github.com/Lubrsi
Commit: c2a2552e46
Pull-request: https://github.com/SerenityOS/serenity/pull/3198
18 changed files with 224 additions and 15 deletions
13
Libraries/LibWeb/Tests/DOM/document.createComment.js
Normal file
13
Libraries/LibWeb/Tests/DOM/document.createComment.js
Normal file
|
@ -0,0 +1,13 @@
|
|||
loadPage("file:///res/html/misc/blank.html");
|
||||
|
||||
afterInitialPageLoad(() => {
|
||||
test("Basic functionality", () => {
|
||||
const comment = document.createComment("Create Comment Test");
|
||||
|
||||
// FIXME: Add this in once Comment's constructor is implemented.
|
||||
//expect(comment).toBeInstanceOf(Comment);
|
||||
expect(comment.nodeName).toBe("#comment");
|
||||
expect(comment.data).toBe("Create Comment Test");
|
||||
expect(comment.length).toBe(19);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue