ladybird/Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js
Ali Mohammad Pur d897abf4c2 LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
2021-05-18 18:48:15 +01:00

16 lines
557 B
JavaScript

describe("createTextNode", () => {
loadLocalPage("/res/html/misc/blank.html");
afterInitialPageLoad(page => {
test("Basic functionality", () => {
const text = page.document.createTextNode("Create Text Test");
// FIXME: Add this in once Text's constructor is implemented.
//expect(text).toBeInstanceOf(Text);
expect(text.nodeName).toBe("#text");
expect(text.data).toBe("Create Text Test");
expect(text.length).toBe(16);
});
});
waitForPageToLoad();
});