Chunky Monkey. Console shows the method working but failed the test

Tell us what’s happening:
Hi, here I have tested the result with all the examples provided, and both browser and fcc consoles show that the result is correct, but I still cannot pass the test. Don’t know what is missing, help please?

Your code so far

function chunkArrayInGroups(arr, size) {
let result = [];
while (arr.length >= size){
return result = result.concat(arr.slice());

chunkArrayInGroups([0, 1, 2, 3, 4, 5, 6, 7, 8], 2);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36.

Link to the challenge:

When I run your code, I do not see the arrays “chunked” correctly in some cases:

that’s quite strange, I wonder why arr slice did not return the rest as an array?