Procházet zdrojové kódy

Tests/LibWeb: Add primitives test for structuredClone()

Kenneth Myhra před 1 rokem
rodič
revize
2c06ad3a05

+ 8 - 0
Tests/LibWeb/Text/expected/HTML/StructuredClone-primitives.txt

@@ -0,0 +1,8 @@
+undefined
+null
+true
+false
+123
+123.456
+9007199254740991
+This is a string

+ 13 - 0
Tests/LibWeb/Text/input/HTML/StructuredClone-primitives.html

@@ -0,0 +1,13 @@
+<script src="../include.js"></script>
+<script>
+    test(() => {
+        println(structuredClone(undefined));
+        println(structuredClone(null));
+        println(structuredClone(true));
+        println(structuredClone(false));
+        println(structuredClone(123));
+        println(structuredClone(123.456));
+        println(structuredClone(BigInt("0x1fffffffffffff")))
+        println(structuredClone("This is a string"));
+    });
+</script>