ReactiveX / learnrx

A series of interactive exercises for learning Microsoft's Reactive Extensions Library for Javascript.
1.4k stars 292 forks source link

Order of keys matters #164

Closed tomkel closed 7 years ago

tomkel commented 7 years ago

Came across this in exercise 20, but probably applies to all.

Expected Output
[{"id":675465,"title":"Fracture","boxart":"http://cdn-0.nflximg.com/images/2891/Fracture120.jpg"},
{"id":65432445,"title":"The Chamber","boxart":"http://cdn-0.nflximg.com/images/2891/TheChamber130.jpg"},
{"id":70111470,"title":"Die Hard","boxart":"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg"},
{"id":654356453,"title":"Bad Boys","boxart":"http://cdn-0.nflximg.com/images/2891/BadBoys140.jpg"}]

Received Output
[{"boxart":"http://cdn-0.nflximg.com/images/2891/Fracture120.jpg","id":675465,"title":"Fracture"},
{"boxart":"http://cdn-0.nflximg.com/images/2891/TheChamber130.jpg","id":65432445,"title":"The Chamber"},
{"boxart":"http://cdn-0.nflximg.com/images/2891/DieHard150.jpg","id":70111470,"title":"Die Hard"},
{"boxart":"http://cdn-0.nflximg.com/images/2891/BadBoys140.jpg","id":654356453,"title":"Bad Boys"}]

The expected and received output are the same. The only difference is that the boxart key is ordered differently.

When the order of keys is changed to match the expected output, the test passes.

tomkel commented 7 years ago

Apparently this is expected behavior.