JS unit tests fix - use toBeUndefined() instead of toEqual(null)