{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/jest/issues/1612","repository_url":"https://api.github.com/repos/facebook/jest","labels_url":"https://api.github.com/repos/facebook/jest/issues/1612/labels{/name}","comments_url":"https://api.github.com/repos/facebook/jest/issues/1612/comments","events_url":"https://api.github.com/repos/facebook/jest/issues/1612/events","html_url":"https://github.com/facebook/jest/issues/1612","id":175044287,"number":1612,"title":"Improve snapshot file sorting","user":{"login":"fson","id":497214,"avatar_url":"https://avatars.githubusercontent.com/u/497214?v=3","gravatar_id":"","url":"https://api.github.com/users/fson","html_url":"https://github.com/fson","followers_url":"https://api.github.com/users/fson/followers","following_url":"https://api.github.com/users/fson/following{/other_user}","gists_url":"https://api.github.com/users/fson/gists{/gist_id}","starred_url":"https://api.github.com/users/fson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fson/subscriptions","organizations_url":"https://api.github.com/users/fson/orgs","repos_url":"https://api.github.com/users/fson/repos","events_url":"https://api.github.com/users/fson/events{/privacy}","received_events_url":"https://api.github.com/users/fson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-05T10:39:42Z","updated_at":"2016-09-05T20:30:11Z","closed_at":null,"body":"**Do you want to request a *feature* or report a *bug*?** Feature\r\n\r\n**What is the current behavior?**\r\n\r\nAt the moment, the snapshots in the `.snap` file are sorted using the string key of the snapshot, so if you have more than 9 snapshots, the order is going to be [1, 10, 11, ..., 2, 3, ...].\r\n\r\nI'm currently using snapshots to test Redux reducers by playing back a sequence of actions and snapshotting the resulting state after each step. It's easy to end up with at least 10 actions in a single test, and since I need to review the snapshot file, it would be very helpful if the snapshots were ordered by the sequence number [1, 2, 3, ...].\r\n\r\n![screen shot 2016-09-05 at 13 32 07](https://cloud.githubusercontent.com/assets/497214/18245496/3a86ffd4-736e-11e6-9be7-db5b0c2465de.png)\r\n\r\n**What is the expected behavior?**\r\n\r\nWe could simply zero pad the numbers and keep the current sorting, but perhaps it would be better to sort the snapshots first by the name and then if there are multiple snapshots with the same name, sort them numerically."},"comment":{"url":"https://api.github.com/repos/facebook/jest/issues/comments/244808204","html_url":"https://github.com/facebook/jest/issues/1612#issuecomment-244808204","issue_url":"https://api.github.com/repos/facebook/jest/issues/1612","id":244808204,"user":{"login":"cpojer","id":13352,"avatar_url":"https://avatars.githubusercontent.com/u/13352?v=3","gravatar_id":"","url":"https://api.github.com/users/cpojer","html_url":"https://github.com/cpojer","followers_url":"https://api.github.com/users/cpojer/followers","following_url":"https://api.github.com/users/cpojer/following{/other_user}","gists_url":"https://api.github.com/users/cpojer/gists{/gist_id}","starred_url":"https://api.github.com/users/cpojer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpojer/subscriptions","organizations_url":"https://api.github.com/users/cpojer/orgs","repos_url":"https://api.github.com/users/cpojer/repos","events_url":"https://api.github.com/users/cpojer/events{/privacy}","received_events_url":"https://api.github.com/users/cpojer/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T20:30:11Z","updated_at":"2016-09-05T20:30:11Z","body":"I agree we should use natural sort for numbers."}}
{"actor":{"display_login":"cpojer"}}