This commit is contained in:
2026-01-16 20:55:57 -06:00
parent b46406f755
commit ce7d83ec91
9 changed files with 48 additions and 246 deletions

View File

@@ -1528,7 +1528,7 @@ return {
test_array_concat: function() {
var arr1 = [1, 2]
var arr2 = [3, 4]
var combined = arr1.concat(arr2)
var combined = array(arr1, arr2)
if (length(combined) != 4) throw "array concat length failed"
if (combined[2] != 3) throw "array concat values failed"
},
@@ -1592,12 +1592,6 @@ return {
if (parts[1] != "b") throw "string split values failed"
},
test_string_replace: function() {
var str = "hello world"
var replaced = str.replace("world", "universe")
if (replaced != "hello universe") throw "string replace failed"
},
test_string_match: function() {
var str = "hello123"
var hasNumbers = /\d/.test(str)
@@ -3422,12 +3416,6 @@ return {
if (some(arr, x => x > 5)) throw "array some no match failed"
},
test_array_flat: function() {
var arr = [1, [2, 3], [4, [5]]]
var flat = arr.flat()
if (flat[0] != 1 || flat[1] != 2 || flat[2] != 3) throw "array flat failed"
},
// ============================================================================
// LOGICAL FUNCTION
// ============================================================================