Drop It - successful test but infinite loop warning

Here is my solution for Drop it

function dropElements(arr, func) {
  while (!func(arr[0])) {
    arr.shift()
  }
  return arr
}

dropElements([1, 2, 3], function(n) {return n < 3; });

I can run the test successfully, but in the console in the background, I get:

// running tests
// tests completed
// console output
Potential infinite loop detected on line 2. Tests may be failing because of this.

I also noticed that it took a couple of seconds to get the check after running the test.
Why is this happening?