summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js')
-rw-r--r--Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js b/Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js
new file mode 100644
index 0000000000..bef06a81c7
--- /dev/null
+++ b/Userland/Libraries/LibWeb/Tests/DOM/document.createTextNode.js
@@ -0,0 +1,13 @@
+loadPage("file:///res/html/misc/blank.html");
+
+afterInitialPageLoad(() => {
+ test("Basic functionality", () => {
+ const text = 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);
+ });
+});