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:
skaunov 2022-02-15 16:53:29 +03:00 committed by GitHub
parent 29216730a8
commit c68cb111a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,13 +4,13 @@ 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() {
assert.isUndefined(filterRangeInPlace([1,2,3], 1, 4));
});
});
});