toBe doesn’t check the contents of the array, it only checks if the references are the same.
expect([1]).toBe([1]) will fail because the references are different.
You should use toEqual, which has some smarts to check the array contents as opposed to just doing a reference comparison.