summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Tests/builtins/String/String.js
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Tests/builtins/String/String.js')
-rw-r--r--Userland/Libraries/LibJS/Tests/builtins/String/String.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Tests/builtins/String/String.js b/Userland/Libraries/LibJS/Tests/builtins/String/String.js
index 687e0929d4..ba076bd5b4 100644
--- a/Userland/Libraries/LibJS/Tests/builtins/String/String.js
+++ b/Userland/Libraries/LibJS/Tests/builtins/String/String.js
@@ -7,3 +7,10 @@ test("typeof", () => {
expect(typeof String()).toBe("string");
expect(typeof new String()).toBe("object");
});
+
+test("length", () => {
+ expect(new String().length).toBe(0);
+ expect(new String("a").length).toBe(1);
+ expect(new String("\u180E").length).toBe(1);
+ expect(new String("\uDBFF\uDFFF").length).toBe(2);
+});