Fixed tests for JS Basic Algorithms: Slice and Splice challenge as suggested in issue #39560 (#39610)
This commit is contained in:
@ -33,9 +33,9 @@ tests:
|
||||
- text: All elements from the first array should be added to the second array in their original order.
|
||||
testString: assert.deepEqual(frankenSplice([1, 2, 3, 4], [], 0), [1, 2, 3, 4]);
|
||||
- text: The first array should remain the same after the function runs.
|
||||
testString: frankenSplice(testArr1, testArr2); assert.deepEqual(testArr1, [1, 2]);
|
||||
testString: frankenSplice(testArr1, testArr2, 1); assert.deepEqual(testArr1, [1, 2]);
|
||||
- text: The second array should remain the same after the function runs.
|
||||
testString: frankenSplice(testArr1, testArr2); assert.deepEqual(testArr2, ["a", "b"]);
|
||||
testString: frankenSplice(testArr1, testArr2, 1); assert.deepEqual(testArr2, ["a", "b"]);
|
||||
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user