const remove = (arr) => {
return arr.splice(1 , 2);
}
const removeElement = (func , arr) => {
return func(arr)
}
console.log(removeElement(remove , [1,2,3,4,5]));
In the above code I am passing remove function to removeElement function as an argument how can I write a test case for removeElement function? I don't want to write the entire remove function inside the test file.