This code never goes in the loop because `actual.getFileExtensions` is a reference to a function, it's not actually calling the function. It happens to have a length property that's 0. You can click on Show Developer Tools from the Jasmine Spec Runner Window, the click on the Source tab and set a breakpoint in the code to see what branches it takes and inspect the structure and value of object. This should be `actual.getFileExtensions().length` instead.

Even better would be to only call `actual.getFileExtensions()` once and store it in a local var.