This method was "private" inside FileLayerLoad control, but it is also useful independently of this class, for apps that implement file selectors or drag & drop themselves.
The new method could have been named "loadFiles", but then legacy "load" method should be renamed "loadFile" for consistency, which breaks backward compatibility.
I had to introduce an extra parameter to the load() method to use a single file reader in tests, so that test code can set result for each files.
Hey thanks a lot for this contribution! That's some nice testing you add also, really appreciable!
The overall looks good to me. Thanks also @leplatrem for taking the time to review!
This method was "private" inside FileLayerLoad control, but it is also useful independently of this class, for apps that implement file selectors or drag & drop themselves. The new method could have been named "loadFiles", but then legacy "load" method should be renamed "loadFile" for consistency, which breaks backward compatibility. I had to introduce an extra parameter to the load() method to use a single file reader in tests, so that test code can set result for each files.