Closed JJ closed 6 years ago
Is it really a good idea to spend extra cycles for sorting stuff that is valid in any order? @samcv what do you think? Or is it good because it does not leak out the seed this way?
Maybe it would be better if the test understood that the result is correct even if the order is different?
I don't know. It's probably better if the result of this kind of thing is deterministic, since it's a string. It would not make much sense to return a different string every time. You will have to live with that if it's stringified; if you don't want to spend the cycles, stringify it yourself...
I think we should sort it before stringifying.
Header order should be preserved. For instance: bot detection heuristics often use header order to check if header FOO is used before or after header BAR.
OK.
to clarify: I am against this PR. only the tests themselves should be modified.
OK, reverted the merge for now.
Uh, anyone looking at this?
Now it's guaranteed to always be different. You have to return always sorted keys. Hope this fixes the problem with 2018.05