Added test to ensure array push is immutable (#4361)
added test to ensure array push is immutable
This commit is contained in:
@ -0,0 +1,3 @@
|
|||||||
|
arr = [1, 2, 3]
|
||||||
|
pushedArr = push(arr, 4)
|
||||||
|
fail = arr[3]
|
||||||
@ -174,3 +174,7 @@ gen_test_parse_fail!(
|
|||||||
gen_test!(add_lots);
|
gen_test!(add_lots);
|
||||||
gen_test!(double_map);
|
gen_test!(double_map);
|
||||||
gen_test!(array_elem_push);
|
gen_test!(array_elem_push);
|
||||||
|
gen_test_fail!(
|
||||||
|
array_elem_push_fail,
|
||||||
|
"undefined value: The array doesn't have any item at index 3"
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user