In karma/phantomjs, the order of additions to the data[dataType] hash is preserved when looping via for (var ... in). In chrome, the order does not appear to be preserved. In a debugger placed on L:586, immediately after data[dataType] is populated, chrome shows the hash entries ordered ascending by their key value (i.e. by id ascending). This commit copies data into the jsDataArray based on the order it was presented in the newResponse.data array. All the existing tests pass. I tried to write an additional test, but this doesn't happen in phantomjs, only in chrome :/ I'm new to testing in JS, so let me know if there's a way I could add coverage to this PR. Thanks!
In karma/phantomjs, the order of additions to the data[dataType] hash is preserved when looping via for (var ... in). In chrome, the order does not appear to be preserved. In a debugger placed on L:586, immediately after data[dataType] is populated, chrome shows the hash entries ordered ascending by their key value (i.e. by id ascending). This commit copies data into the jsDataArray based on the order it was presented in the newResponse.data array. All the existing tests pass. I tried to write an additional test, but this doesn't happen in phantomjs, only in chrome :/ I'm new to testing in JS, so let me know if there's a way I could add coverage to this PR. Thanks!