const existingFiles = [ 'foo.zip', 'foo_.zip' ]; spyOn(fs, 'readdirSync').and.returnValue(existingFiles); When spying on the value, I am expecting a string[] which is one of the overloads that the ...