summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Tests/DOM/document.createComment.js
blob: 1b67103110bdef03ae9e8fe9634865c7c6b1cb63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
describe("createComment", () => {
    loadLocalPage("/res/html/misc/blank.html");

    afterInitialPageLoad(page => {
        test("Basic functionality", () => {
            const comment = page.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);
        });
    });
    waitForPageToLoad();
});