Skip to content

Commit

Permalink
Test check origin array
Browse files Browse the repository at this point in the history
  • Loading branch information
shiroyk committed Aug 6, 2024
1 parent 41690ac commit c953bb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions builtin_arrray_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,13 @@ func TestArrayToSpliced(t *testing.T) {
assert(compareArray(a, [1, 2, 3, 4, 5]));
assert(compareArray(c, [1, 4, 5]));
assert(compareArray(a.toSpliced(4, 2, 'a', 'b'), [1, 2, 3, 4, 'a', 'b']));
assert(compareArray(a, [1, 2, 3, 4, 5]));
assert(compareArray(a.toSpliced(-2, 2), [1, 2, 3]));
assert(compareArray(a, [1, 2, 3, 4, 5]));
assert(compareArray(a.toSpliced(2, 10), [1, 2]));
assert(compareArray(a, [1, 2, 3, 4, 5]));
assert(compareArray(a.toSpliced(1, 0, 'a'), [1, 'a', 2, 3, 4, 5]));
assert(compareArray(a, [1, 2, 3, 4, 5]));
`
testScriptWithTestLib(SCRIPT, _undefined, t)
}

0 comments on commit c953bb0

Please sign in to comment.