Update test.js
Hey there! I suggest to slightly modify the first test case, so its input cover both checks in the solution. Currently omitting the check for _a_ still let solution to pass the test. ```js if (/* val < a || */ val > b) { arr.splice(i, 1); i--; } ```
This commit is contained in:
parent
29216730a8
commit
c68cb111a4
1 changed files with 3 additions and 3 deletions
|
@ -4,9 +4,9 @@ describe("filterRangeInPlace", function() {
|
|||
|
||||
let arr = [5, 3, 8, 1];
|
||||
|
||||
filterRangeInPlace(arr, 1, 4);
|
||||
filterRangeInPlace(arr, 2, 5);
|
||||
|
||||
assert.deepEqual(arr, [3, 1]);
|
||||
assert.deepEqual(arr, [5, 3]);
|
||||
});
|
||||
|
||||
it("doesn't return anything", function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue