New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regionprovider Region ID fetching optimisation #1202
Conversation
loadText('test/csv/mini_ced.xml').then(function(xml) { | ||
ced.loadRegionsFromXML(xml); | ||
expect(ced.regions.length).toEqual(6); | ||
ced.loadRegionIDs().then(function(json) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't really a comment on your commit, but on the existing code - can you set it up so the unit tests didn't go off to a server at all, eg. using a spy? (eg. see ArcGisMapServerCatalogItemSpec)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw @kring's doing some cool work on this right now using sinon.fakeServer.create()
, to solve the problem of failing unit tests on IE9 (which cannot load data from the region mapping server without a proxy).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good idea.
OK, that's all I can think of! Over to you again :-) |
…r more realistic testing.
Looks good! Let me know when you're ready for me to take another look. |
Oh, yep, I'm ready - think I addressed everything. |
Regionprovider Region ID fetching optimisation
This PR includes two separate optimisations: